本文整理汇总了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);
}
示例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);
}
示例3: canSetProperty
/**
* @inheritdoc
*/
public function canSetProperty($name, $checkVars = true)
{
if (isset($this->attributes[$name]) || $name === $this->flagsAttribute) {
return true;
}
return parent::canSetProperty($name, $checkVars);
}
示例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);
}
示例5: canSetProperty
/**
* @inheritdoc
*/
public function canSetProperty($name, $checkVars = true)
{
if (parent::canSetProperty($name, $checkVars)) {
return true;
} else {
return $this->hasOwnerRelation($name);
}
}
示例6: canSetProperty
/**
* @inheritdoc
*/
public function canSetProperty($name, $checkVars = true)
{
return $this->transformedPropertyExists($name) || parent::canSetProperty($name, $checkVars);
}
示例7: canSetProperty
/**
* @inheritdoc
*/
public function canSetProperty($name, $checkVars = true)
{
if (parent::canSetProperty($name, $checkVars)) {
return true;
}
return $name === $this->relationReferenceAttribute;
}
示例8: canSetProperty
/**
* @inheritdoc
*/
public function canSetProperty($name, $checkVars = true)
{
return in_array($name, $this->virtualAttributesNames()) ? true : parent::canSetProperty($name, $checkVars);
}
示例9: canSetProperty
/**
* @inheritdoc
*/
public function canSetProperty($name, $checkVars = true)
{
if ($this->hasAttributeValue($name)) {
return true;
} else {
return parent::canSetProperty($name, $checkVars);
}
}
示例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);
}
示例11: canSetProperty
public function canSetProperty($name, $checkVars = true)
{
if ($this->hasStoreRelation($name)) {
return true;
}
return parent::canSetProperty($name, $checkVars);
}
示例12: canSetProperty
/**
* @inheritdoc
*/
public function canSetProperty($name, $checkVars = true)
{
return stripos($name, 'client') === 0 && strcasecmp($name, 'clientId') != 0 || parent::canSetProperty($name, $checkVars);
}
示例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;
}
示例14: canSetProperty
/**
* @param string $name
* @param bool $checkVars
* @return bool
*/
public function canSetProperty($name, $checkVars = true)
{
return $name === $this->virtAttr || parent::canSetProperty($name, $checkVars);
}
示例15: canSetProperty
public function canSetProperty($name, $checkVars = true)
{
$rels = array_flip($this->directoryAttributes);
return isset($rels[$name]) || parent::canSetProperty($name, $checkVars);
}