Exemplo n.º 1
0
 /**
  * Initializes the object.
  * This method is invoked at the end of the constructor after the object is initialized with the
  * given configuration.
  *
  * @throws InvalidConfigException
  */
 public function init()
 {
     if ($this->modelClass === null && $this->findModel === null) {
         $className = get_class($this);
         throw new InvalidConfigException("{$className}::\$modelClass or {$className}::\$findModel must be set.");
     }
     parent::init();
 }
Exemplo n.º 2
0
 /**
  * Initializes the object.
  * This method is invoked at the end of the constructor after the object is initialized with the
  * given configuration.
  *
  * @throws InvalidConfigException
  */
 public function init()
 {
     if ($this->modelClass === null && $this->prepareDataProvider === null) {
         $className = get_class($this);
         throw new InvalidConfigException("{$className}::\$modelClass or {$className}::\$prepareDataProvider must be set.");
     }
     parent::init();
 }