当前位置: 首页>>代码示例>>PHP>>正文


PHP Behavior::canSetProperty方法代码示例

本文整理汇总了PHP中yii\base\Behavior::canSetProperty方法的典型用法代码示例。如果您正苦于以下问题:PHP Behavior::canSetProperty方法的具体用法?PHP Behavior::canSetProperty怎么用?PHP Behavior::canSetProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\base\Behavior的用法示例。


在下文中一共展示了Behavior::canSetProperty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if ($name === $this->attribute) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
开发者ID:2amigos,项目名称:yii2-taggable-behavior,代码行数:10,代码来源:Taggable.php

示例2: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (in_array($name, [$this->titleAttribute, $this->keywordsAttribute, $this->descriptionAttribute])) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
开发者ID:romi45,项目名称:yii2-seo-behavior,代码行数:10,代码来源:SeoBehavior.php

示例3: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (isset($this->attributes[$name]) || $name === $this->flagsAttribute) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
开发者ID:Mirocow,项目名称:yii2-flag-behavior,代码行数:10,代码来源:FlagBehavior.php

示例4: canSetProperty

 public function canSetProperty($name, $checkVars = true)
 {
     $getter = 'get' . $name;
     if (method_exists($this->owner, $getter) && $this->owner->{$getter}() instanceof ActiveQuery) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
开发者ID:Liv1020,项目名称:cms,代码行数:8,代码来源:RelationalBehavior.php

示例5: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     } else {
         return $this->hasOwnerRelation($name);
     }
 }
开发者ID:xyxdasnjss,项目名称:imshop,代码行数:11,代码来源:RelationsBehavior.php

示例6: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return $this->transformedPropertyExists($name) || parent::canSetProperty($name, $checkVars);
 }
开发者ID:tsyrya,项目名称:mybriop,代码行数:7,代码来源:TransformationBehavior.php

示例7: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     }
     return $name === $this->relationReferenceAttribute;
 }
开发者ID:yii2tech,项目名称:ar-linkmany,代码行数:10,代码来源:LinkManyBehavior.php

示例8: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->virtualAttributesNames()) ? true : parent::canSetProperty($name, $checkVars);
 }
开发者ID:cakebake,项目名称:yii2-scalable-behavior,代码行数:7,代码来源:ScalableBehavior.php

示例9: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if ($this->hasAttributeValue($name)) {
         return true;
     } else {
         return parent::canSetProperty($name, $checkVars);
     }
 }
开发者ID:maddoger,项目名称:yii2-datetimepicker,代码行数:11,代码来源:DateTimeBehavior.php

示例10: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true, $checkBehaviors = true)
 {
     if ($name == $this->relationParameter && $this->via !== null) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars, $checkBehaviors);
 }
开发者ID:alesar-code,项目名称:yii2-base,代码行数:10,代码来源:RelationBehavior.php

示例11: canSetProperty

 public function canSetProperty($name, $checkVars = true)
 {
     if ($this->hasStoreRelation($name)) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
开发者ID:RangelReale,项目名称:yii2-storerelation,代码行数:7,代码来源:StoreRelationBehavior.php

示例12: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return stripos($name, 'client') === 0 && strcasecmp($name, 'clientId') != 0 || parent::canSetProperty($name, $checkVars);
 }
开发者ID:mdmsoft,项目名称:yii2-client-tools,代码行数:7,代码来源:ClientBehavior.php

示例13: canSetProperty

 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     }
     if ($this->owner === null) {
         return false;
     }
     return $name === $this->fileAttribute;
 }
开发者ID:yii2tech,项目名称:ar-file,代码行数:13,代码来源:FileBehavior.php

示例14: canSetProperty

 /**
  * @param string $name
  * @param bool $checkVars
  * @return bool
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return $name === $this->virtAttr || parent::canSetProperty($name, $checkVars);
 }
开发者ID:ptheofan,项目名称:yii2-statemachine,代码行数:9,代码来源:StateMachineBehavior.php

示例15: canSetProperty

 public function canSetProperty($name, $checkVars = true)
 {
     $rels = array_flip($this->directoryAttributes);
     return isset($rels[$name]) || parent::canSetProperty($name, $checkVars);
 }
开发者ID:tsyrya,项目名称:mybriop,代码行数:5,代码来源:DirectoryBehavior.php


注:本文中的yii\base\Behavior::canSetProperty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。