Пример #1
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if ($name === $this->attribute) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
Пример #2
0
 /**
  * @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
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (isset($this->attributes[$name]) || $name === $this->flagsAttribute) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
Пример #4
0
 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
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     } else {
         return $this->hasOwnerRelation($name);
     }
 }
Пример #6
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return $this->transformedPropertyExists($name) || parent::canSetProperty($name, $checkVars);
 }
Пример #7
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     }
     return $name === $this->relationReferenceAttribute;
 }
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->virtualAttributesNames()) ? true : parent::canSetProperty($name, $checkVars);
 }
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if ($this->hasAttributeValue($name)) {
         return true;
     } else {
         return parent::canSetProperty($name, $checkVars);
     }
 }
Пример #10
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true, $checkBehaviors = true)
 {
     if ($name == $this->relationParameter && $this->via !== null) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars, $checkBehaviors);
 }
 public function canSetProperty($name, $checkVars = true)
 {
     if ($this->hasStoreRelation($name)) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
Пример #12
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return stripos($name, 'client') === 0 && strcasecmp($name, 'clientId') != 0 || parent::canSetProperty($name, $checkVars);
 }
Пример #13
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     }
     if ($this->owner === null) {
         return false;
     }
     return $name === $this->fileAttribute;
 }
 /**
  * @param string $name
  * @param bool $checkVars
  * @return bool
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return $name === $this->virtAttr || parent::canSetProperty($name, $checkVars);
 }
Пример #15
0
 public function canSetProperty($name, $checkVars = true)
 {
     $rels = array_flip($this->directoryAttributes);
     return isset($rels[$name]) || parent::canSetProperty($name, $checkVars);
 }
Пример #16
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return $this->owner->getRelation($name, false) !== null || parent::canSetProperty($name, $checkVars);
 }
 public function canSetProperty($name, $checkVars = true)
 {
     $matches = null;
     if (preg_match('/__(\\w+)_(\\w+)__/', $name, $matches)) {
         $attr = $matches[1];
         $vattr = $matches[2];
         if (isset($this->attributes[$attr])) {
             /** @var Illustration $cfg */
             $cfg = $this->attributes[$attr];
             return $checkVars ? $cfg->hasProperty($vattr) : true;
         }
     }
     return parent::canSetProperty($name, $checkVars);
 }
Пример #18
0
 /**
  * @param string $name
  * @param bool|true $checkVars
  * @return bool
  */
 public function canSetProperty($name, $checkVars = true)
 {
     $originalName = str_replace($this->filedSuffix, '', $name);
     if (isset($this->fields[$originalName])) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
 }
Пример #19
0
 public function canSetProperty($name, $checkVars = true)
 {
     if ($this->fileInputName == $name) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars);
     // TODO: Change the autogenerated stub
 }
Пример #20
0
 /**
  * @inheritdoc
  * @return bool
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return $this->isAttribute($name) ?: parent::canSetProperty($name, $checkVars);
 }
Пример #21
0
 /**
  * Expose [[$attributes]] writable
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return isset($this->attributes[$name]) || parent::canSetProperty($name, $checkVars);
 }
Пример #22
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->getTranslationModelAttributes()) || parent::canSetProperty($name, $checkVars);
 }
Пример #23
0
 /**
  * Permission for this behavior to set relational attributes.
  *
  * {@inheritdoc}
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->relationalFields) || parent::canSetProperty($name, $checkVars);
 }
Пример #24
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     }
     $model = $this->getRoleRelationModel();
     return $model->hasAttribute($name) || $model->canSetProperty($name, $checkVars);
 }
Пример #25
0
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     if (parent::canSetProperty($name, $checkVars)) {
         return true;
     }
     if ($this->owner == null) {
         return false;
     }
     $model = $this->getDefaultVariationModel();
     return is_object($model) && $model->hasAttribute($name);
 }
Пример #26
0
 /**
  * Captures relation setters.
  * Relation setters are only triggered, if a validation rule is applied to the relation property.
  * Those validators are automatically added on 'attach'.
  * 
  * @param  string  $name      the property's name
  * @param  boolean $checkVars 
  * @param  array   $config 
  * @internal
  */
 public function canSetProperty($name, $checkVars = true, $checkBehaviors = true)
 {
     if (in_array($name, $this->_relations)) {
         return true;
     }
     return parent::canSetProperty($name, $checkVars, $checkBehaviors);
 }
 /**
  * Returns a value indicating whether a property can be set.
  * We return true if it is one of our properties and pass the
  * params on to the parent class otherwise.
  * TODO: Make it honor $checkVars and $checkBehaviors ??
  *
  * @param string $name the property name
  * @param boolean $checkVars whether to treat member variables as properties
  * @param boolean $checkBehaviors whether to treat behaviors' properties as properties of this component
  * @return boolean whether the property can be written
  * @see canGetProperty()
  */
 public function canSetProperty($name, $checkVars = true, $checkBehaviors = true)
 {
     return array_key_exists($name, $this->_fields) ? true : parent::canSetProperty($name, $checkVars, $checkBehaviors);
 }
Пример #28
0
 public function canSetProperty($name, $checkVars = true)
 {
     return $this->_relation->canSetProperty($name, $checkVars) || parent::canSetProperty($name, $checkVars);
 }
 /**
  * Expose [[$translationAttributes]] writable
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return in_array($name, $this->translationAttributes) ? true : parent::canSetProperty($name, $checkVars);
 }
 /**
  * @inheritdoc
  */
 public function canSetProperty($name, $checkVars = true)
 {
     return !empty($this->relations[$name]) || parent::canSetProperty($name, $checkVars);
 }