Inheritance: extends yii\base\Behavior
 /**
  * @return bool
  */
 public function isVisible()
 {
     if (!parent::isVisible()) {
         return false;
     }
     return Validate::validate(new HasBehavior(HasRelatedProperties::className()), $this->controller->model)->isValid();
 }
 /**
  * @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']]]);
 }
Example #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']]);
 }
Example #4
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return array_merge(parent::behaviors(), [HasRelatedProperties::className() => ['class' => HasRelatedProperties::className(), 'relatedElementPropertyClassName' => ShopBuyerProperty::className(), 'relatedPropertyClassName' => ShopPersonTypeProperty::className()]]);
 }
Example #5
0
File: User.php Project: 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()]]);
 }
Example #6
0
 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()]]);
 }