Пример #1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->on(self::EVENT_BEFORE_VALIDATE, [$this, 'updateLastUpdated']);
     $this->on(self::EVENT_BEFORE_VALIDATE, [$this, 'updatePeakMemory']);
     $this->on(self::EVENT_BEFORE_VALIDATE, [$this, 'serializeStatusLog']);
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return array_merge(parent::behaviors(), ['Registry' => ['class' => 'canis\\db\\behaviors\\Registry'], 'Roleable' => ['class' => 'cascade\\components\\db\\behaviors\\Roleable'], 'ActiveAccess' => ['class' => 'cascade\\components\\db\\behaviors\\ActiveAccess']]);
 }
Пример #3
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return array_merge(parent::behaviors(), self::baseBehaviors(), []);
 }
Пример #4
0
 /**
  * @inheritdoc
  */
 public function getPackage($urlAction = 'view')
 {
     $p = parent::getPackage($urlAction);
     $p['type'] = 'Interface';
     if ($this->hasIcon()) {
         $p['icon'] = $this->getIcon();
     }
     return $p;
 }
Пример #5
0
 /**
  * Set local model.
  *
  * @param [[@doctodo param_type:value]] $value [[@doctodo param_description:value]]
  */
 public function setLocalModel($value)
 {
     $this->_localModel = ActiveRecord::parseModelAlias($value);
 }