/**
  * @return bool
  */
 public function isVisible()
 {
     if (!parent::isVisible()) {
         return false;
     }
     return Validate::validate(new HasBehavior(HasRelatedProperties::className()), $this->controller->model)->isValid();
 }
예제 #2
0
 /**
  * @return array
  */
 public function behaviors()
 {
     return array_merge(parent::behaviors(), [HasRelatedProperties::className() => ['class' => HasRelatedProperties::className(), 'relatedElementPropertyClassName' => Form2FormSendProperty::className(), 'relatedPropertyClassName' => Form2FormProperty::className()], Serialize::className() => ['class' => Serialize::className(), 'fields' => ['data_labels', 'data_values', 'data_server', 'data_session', 'data_cookie', 'additional_data', 'data_request']]]);
 }
예제 #3
0
 /**
  * @return array
  */
 public function behaviors()
 {
     return array_merge(parent::behaviors(), [TimestampPublishedBehavior::className() => TimestampPublishedBehavior::className(), HasStorageFile::className() => ['class' => HasStorageFile::className(), 'fields' => ['image_id', 'image_full_id']], HasStorageFileMulti::className() => ['class' => HasStorageFileMulti::className(), 'relations' => ['images', 'files']], HasRelatedProperties::className() => ['class' => HasRelatedProperties::className(), 'relatedElementPropertyClassName' => CmsContentElementProperty::className(), 'relatedPropertyClassName' => CmsContentProperty::className()], HasTrees::className() => ['class' => HasTrees::className(), 'elementTreesClassName' => CmsContentElementTree::className()], SeoPageName::className() => ['class' => SeoPageName::className(), 'generatedAttribute' => 'code']]);
 }
예제 #4
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return array_merge(parent::behaviors(), [HasRelatedProperties::className() => ['class' => HasRelatedProperties::className(), 'relatedElementPropertyClassName' => ShopBuyerProperty::className(), 'relatedPropertyClassName' => ShopPersonTypeProperty::className()]]);
 }
예제 #5
0
파일: User.php 프로젝트: Liv1020/cms
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return array_merge(parent::behaviors(), [TimestampBehavior::className(), HasStorageFile::className() => ['class' => HasStorageFile::className(), 'fields' => ['image_id']], HasRelatedProperties::className() => ['class' => HasRelatedProperties::className(), 'relatedElementPropertyClassName' => CmsUserProperty::className(), 'relatedPropertyClassName' => CmsUserUniversalProperty::className()]]);
 }
예제 #6
0
파일: Tree.php 프로젝트: skeeks-cms/cms
 public function behaviors()
 {
     $behaviors = parent::behaviors();
     return ArrayHelper::merge(parent::behaviors(), [HasStorageFile::className() => ['class' => HasStorageFile::className(), 'fields' => ['image_id', 'image_full_id']], HasStorageFileMulti::className() => ['class' => HasStorageFileMulti::className(), 'relations' => ['images', 'files']], Implode::className() => ['class' => Implode::className(), "fields" => ["tree_menu_ids"]], "implode_tree" => ['class' => Implode::className(), "fields" => ["pids"], "delimetr" => self::PIDS_DELIMETR], HasRelatedProperties::className() => ['class' => HasRelatedProperties::className(), 'relatedElementPropertyClassName' => CmsTreeProperty::className(), 'relatedPropertyClassName' => CmsTreeTypeProperty::className()]]);
 }