This commit is contained in:
Alexander Makarov
2014-09-04 03:27:13 +04:00
parent 3af08064b8
commit 00ca1cb4b3
16 changed files with 50 additions and 34 deletions

View File

@ -421,7 +421,7 @@ Yii Framework 2 Change Log
- Enh #2526: Allow for null values in batchInsert (skotos)
- Enh #2646: Added support for specifying hostinfo in the pattern of a URL rule (qiangxue)
- Enh #2661: Added boolean column type support for SQLite (qiangxue)
- Enh #2670: Changed `console\Controller::globalOptions()` to `options($actionId)` to (make it possible to) differentiate options per action (hqx)
- Enh #2670: Changed `console\Controller::globalOptions()` to `options($actionID)` to (make it possible to) differentiate options per action (hqx)
- Enh #2714: Added support for formatting time intervals relative to the current time with `yii\base\Formatter` (drenty)
- Enh #2726: Added `yii\db\ActiveRecord::loadDefaultValues()` that fills default values from DB schema (samdark)
- Enh #2729: Added `FilterValidator::skipOnArray` so that filters like `trim` will not fail for array inputs (qiangxue)

View File

@ -267,10 +267,10 @@ class Controller extends \yii\base\Controller
* Note that the values setting via options are not available
* until [[beforeAction()]] is being called.
*
* @param string $actionId the action id of the current request
* @param string $actionID the action id of the current request
* @return array the names of the options valid for the action
*/
public function options($actionId)
public function options($actionID)
{
// $id might be used in subclass to provide options specific to action id
return ['color', 'interactive'];

View File

@ -45,12 +45,12 @@ abstract class BaseMigrateController extends Controller
/**
* @inheritdoc
*/
public function options($actionId)
public function options($actionID)
{
return array_merge(
parent::options($actionId),
parent::options($actionID),
['migrationPath'], // global for all actions
($actionId == 'create') ? ['templateFile'] : [] // action create
($actionID == 'create') ? ['templateFile'] : [] // action create
);
}

View File

@ -71,9 +71,9 @@ class FixtureController extends Controller
/**
* @inheritdoc
*/
public function options($actionId)
public function options($actionID)
{
return array_merge(parent::options($actionId), [
return array_merge(parent::options($actionID), [
'namespace', 'globalFixtures', 'append'
]);
}

View File

@ -72,10 +72,10 @@ class MigrateController extends BaseMigrateController
/**
* @inheritdoc
*/
public function options($actionId)
public function options($actionID)
{
return array_merge(
parent::options($actionId),
parent::options($actionID),
['migrationTable', 'db'] // global for all actions
);
}