Class mdm\admin\components\Configs
| Inheritance | mdm\admin\components\Configs » yii\base\Object |
|---|---|
| Available since version | 1.0 |
Configs Used for configure some value. To set config you can use yii\base\Application::$params
return [
'mdm.admin.configs' => [
'db' => 'customDb',
'menuTable' => 'admin_menu',
]
];
or use Yii::$container
Yii::$container->set('mdm\admin\components\Configs',[
'db' => 'customDb',
'menuTable' => 'admin_menu',
]);
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $cache | yii\caching\Cache | Cache component. | mdm\admin\components\Configs |
| $cacheDuration | integer | Cache duration. | mdm\admin\components\Configs |
| $db | yii\db\Connection | Database connection. | mdm\admin\components\Configs |
| $menuTable | string | Menu table name. | mdm\admin\components\Configs |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __call() | Calls the named method which is not a class method. | yii\base\Object |
| __construct() | Constructor. | yii\base\Object |
| __get() | Returns the value of an object property. | yii\base\Object |
| __isset() | Checks if the named property is set (not null). | yii\base\Object |
| __set() | Sets value of an object property. | yii\base\Object |
| __unset() | Sets an object property to null. | yii\base\Object |
| canGetProperty() | Returns a value indicating whether a property can be read. | yii\base\Object |
| canSetProperty() | Returns a value indicating whether a property can be set. | yii\base\Object |
| className() | Returns the fully qualified name of this class. | yii\base\Object |
| hasMethod() | Returns a value indicating whether a method is defined. | yii\base\Object |
| hasProperty() | Returns a value indicating whether a property is defined. | yii\base\Object |
| init() | Initializes the object. | mdm\admin\components\Configs |
| instance() | Create instance of self | mdm\admin\components\Configs |
Property Details
Cache component.
Cache duration. Default to a month.
Database connection.
Menu table name.