Пример #1
0
 /**
  * @return array
  */
 public function behaviors()
 {
     return ['maddoger\\textformats\\TextFormatsBehavior', 'configurationBehavior' => ['class' => ConfigurationBehavior::className(), 'key' => 'maddoger\\website\\Module', 'modelClass' => 'maddoger\\website\\common\\models\\Config']];
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['configurationBehavior' => ['class' => ConfigurationBehavior::className(), 'attributes' => ['avatarsUploadPath' => $this->avatarsUploadPath, 'avatarsUploadUrl' => $this->avatarsUploadUrl, 'sortNumber' => $this->sortNumber], 'saveToOwnerProperties' => true, 'view' => $this->getViewPath() . DIRECTORY_SEPARATOR . 'configuration.php', 'roles' => ['user.configuration'], 'dynamicModel' => ['formName' => $this->id . 'Configuration', 'rules' => [[['avatarsUploadPath', 'avatarsUploadUrl'], 'string'], [['avatarsUploadPath', 'avatarsUploadUrl', 'sortNumber'], 'default', ['value' => null]]]]]];
 }