예제 #1
0
 /**
  * @return array configuration of behaviors
  */
 public function behaviors()
 {
     $parentBehaviors = parent::behaviors();
     $thisBehaviors = ['type' => ['class' => ModelTypeAttribute::className(), 'attribute' => 'content_type', 'attributeValue' => self::TYPE_ARTICLE], 'relationDelete' => ['class' => RelationsDelete::className(), 'relations' => ['articleCategories']]];
     return ArrayHelper::merge($parentBehaviors, $thisBehaviors);
 }
예제 #2
0
파일: Page.php 프로젝트: czechcamus/dasport
 /**
  * @return array configuration of behaviors
  */
 public function behaviors()
 {
     $parentBehaviors = parent::behaviors();
     $thisBehaviors = ['type' => ['class' => ModelTypeAttribute::className(), 'attribute' => 'content_type', 'attributeValue' => self::TYPE_PAGE], 'menuItemsReset' => MenuItemsReset::className(), 'relationDelete' => ['class' => RelationsDelete::className(), 'relations' => ['menuItemContents']]];
     return ArrayHelper::merge($parentBehaviors, $thisBehaviors);
 }
예제 #3
0
 /**
  * @return array configuration of behaviors
  */
 public function behaviors()
 {
     $parentBehaviors = parent::behaviors();
     $thisBehaviors = ['type' => ['class' => ModelTypeAttribute::className(), 'attribute' => 'content_type', 'attributeValue' => self::TYPE_NEWSLETTER]];
     return ArrayHelper::merge($parentBehaviors, $thisBehaviors);
 }