Example #1
0
 /**
  * @return array configuration of behaviors.
  */
 public function behaviors()
 {
     return ['main' => ['class' => UniqueMainProperty::className(), 'filterAttributes' => [['attribute' => 'web_id', 'operator' => '=']]], 'relationsDelete' => ['class' => RelationsDelete::className(), 'relations' => ['menuItems']]];
 }
Example #2
0
 /**
  * @return array configuration of behaviors.
  */
 public function behaviors()
 {
     return ['timestamp' => ['class' => TimestampBehavior::className(), 'value' => new Expression('NOW()')], 'blame' => BlameableBehavior::className(), 'main' => ['class' => UniqueMainProperty::className(), 'filterAttributes' => [['attribute' => 'menu_id', 'operator' => '='], ['attribute' => 'language_id', 'operator' => '=']]], 'relationsDelete' => ['class' => RelationsDelete::className(), 'relations' => ['menuItemContent']]];
 }
Example #3
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ['main' => UniqueMainProperty::className(), 'timestamp' => ['class' => TimestampBehavior::className(), 'value' => new Expression('NOW()')], 'blame' => BlameableBehavior::className(), 'relationDelete' => ['class' => RelationsDelete::className(), 'relations' => ['answers']]];
 }
Example #4
0
 /**
  * @return array configuration of behaviors.
  */
 public function behaviors()
 {
     return ['main' => UniqueMainProperty::className(), 'relationsDelete' => ['class' => RelationsDelete::className(), 'relations' => ['menus']]];
 }
Example #5
0
 /**
  * @return array configuration of behaviors.
  */
 public function behaviors()
 {
     return ['main' => ['class' => UniqueMainProperty::className(), 'filterAttributes' => [['attribute' => 'content', 'operator' => '=']]], 'updateLayoutId' => UpdateLayoutId::className()];
 }
Example #6
0
 /**
  * @return array configuration of behaviors
  */
 public function behaviors()
 {
     $parentBehaviors = parent::behaviors();
     $thisBehaviors = ['main' => ['class' => UniqueMainProperty::className(), 'filterAttributes' => [['attribute' => 'category_type', 'operator' => '='], ['attribute' => 'language_id', 'operator' => '=']]], 'type' => ['class' => ModelTypeAttribute::className(), 'attribute' => 'category_type', 'attributeValue' => self::TYPE_CATEGORY], 'menuItemsReset' => MenuItemsReset::className(), 'relationDelete' => ['class' => RelationsDelete::className(), 'relations' => ['articleCategories', 'menuItemContents']]];
     return ArrayHelper::merge($parentBehaviors, $thisBehaviors);
 }
Example #7
0
 /**
  * @return array configuration of behaviors.
  */
 public function behaviors()
 {
     return ['main' => UniqueMainProperty::className()];
 }