/**
  * @inheritdoc
  */
 public function rules()
 {
     return array_merge(parent::rules(), [[['controllerClass', 'modelClass', 'searchModelClass', 'baseControllerClass'], 'filter', 'filter' => 'trim'], [['modelClass', 'controllerClass', 'baseControllerClass', 'indexWidgetType'], 'required'], [['searchModelClass'], 'compare', 'compareAttribute' => 'modelClass', 'operator' => '!==', 'message' => 'Search Model Class must not be equal to Model Class.'], [['modelClass', 'controllerClass', 'baseControllerClass', 'searchModelClass'], 'match', 'pattern' => '/^[\\w\\\\]*$/', 'message' => 'Only word characters and backslashes are allowed.'], [['modelClass'], 'validateClass', 'params' => ['extends' => BaseActiveRecord::className()]], [['modelClass'], 'match', 'pattern' => '/^(?:[a-zA-Z][a-zA-Z0-9]+\\\\)+[A-Z][a-zA-Z0-9]+$/'], [['baseControllerClass'], 'validateClass', 'params' => ['extends' => Controller::className()]], [['controllerClass'], 'match', 'pattern' => '/Controller$/', 'message' => 'Controller class name must be suffixed with "Controller".'], [['controllerClass'], 'match', 'pattern' => '/(^|\\\\)[A-Z][^\\\\]+Controller$/', 'message' => 'Controller class name must start with an uppercase letter.'], [['controllerClass', 'searchModelClass'], 'validateNewClass'], [['indexWidgetType'], 'in', 'range' => ['grid', 'list']], [['modelClass'], 'validateModelClass'], [['enableI18N'], 'boolean'], [['messageCategory'], 'validateMessageCategory', 'skipOnEmpty' => false], [['viewPath'], 'safe'], [['icon'], 'match', 'pattern' => '/^(?:[0-9a-z\\-]+)?$/i', 'message' => 'No valid image class.'], [['addingI18NStrings', 'generateRelationsFields'], 'boolean'], [['db'], 'filter', 'filter' => 'trim'], [['db'], 'required'], [['db'], 'match', 'pattern' => '/^\\w+$/', 'message' => 'Only word characters are allowed.'], [['db'], 'validateDb']]);
 }