Class mdm\admin\components\Configs

Inheritancemdm\admin\components\Configs » yii\base\Object
Available since version1.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 Methods

Hide inherited methods

MethodDescriptionDefined 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 public property

Cache component.

$cacheDuration public property

Cache duration. Default to a month.

$db public property

Database connection.

$menuTable public property
string $menuTable '{{%menu}}'

Menu table name.

Method Details

init() public method

Initializes the object.

This method is invoked at the end of the constructor after the object is initialized with the given configuration.

void init( )
instance() public method

Create instance of self

static instance( )