예제 #1
0
 /**
  * Initializes the [[rules]] array by instantiating rule objects from configurations.
  */
 public function init()
 {
     parent::init();
     $this->user = Instance::ensure($this->user, User::className());
     foreach ($this->rules as $i => $rule) {
         if (is_array($rule)) {
             $this->rules[$i] = Leaps::createObject(array_merge($this->ruleConfig, $rule));
         }
     }
 }
예제 #2
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if ($this->view === null) {
         $this->view = Leaps::$app->getView();
     }
 }