mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fixes #4914
This commit is contained in:
@ -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)
|
||||
|
||||
@ -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'];
|
||||
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -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'
|
||||
]);
|
||||
}
|
||||
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user