コード例 #1
0
ファイル: Article.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_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
ファイル: Sound.php プロジェクト: czechcamus/dasport
 /**
  * @return array configuration of behaviors
  */
 public function behaviors()
 {
     return ['type' => ['class' => ModelTypeAttribute::className(), 'attribute' => 'type', 'attributeValue' => self::TYPE_SOUND]];
 }
コード例 #4
0
ファイル: Category.php プロジェクト: czechcamus/dasport
 /**
  * @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);
 }
コード例 #5
0
ファイル: Newsletter.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_NEWSLETTER]];
     return ArrayHelper::merge($parentBehaviors, $thisBehaviors);
 }
コード例 #6
0
ファイル: Gallery.php プロジェクト: czechcamus/dasport
 /**
  * @return array configuration of behaviors
  */
 public function behaviors()
 {
     $parentBehaviors = parent::behaviors();
     $thisBehaviors = ['type' => ['class' => ModelTypeAttribute::className(), 'attribute' => 'category_type', 'attributeValue' => self::TYPE_GALLERY], 'relationDelete' => ['class' => RelationsDelete::className(), 'relations' => ['imageGalleries']]];
     return ArrayHelper::merge($parentBehaviors, $thisBehaviors);
 }
コード例 #7
0
ファイル: Image.php プロジェクト: czechcamus/dasport
 /**
  * @return array configuration of behaviors
  */
 public function behaviors()
 {
     return ['type' => ['class' => ModelTypeAttribute::className(), 'attribute' => 'type', 'attributeValue' => self::TYPE_IMAGE], 'relationDelete' => ['class' => RelationsDelete::className(), 'relations' => ['imageGalleries']]];
 }