public function canSetProperty($name, $checkVars = true)
    {
        /** @var BaseActiveRecord $owner */
        $owner = $this->owner;
        $relation = $owner->getRelation($name, false);
        if (in_array($name, $this->_relations) && !is_null($relation)) {
            return true;
        }
        return parent::canSetProperty($name, $checkVars);
    }
public function canSetProperty($name, $checkVars = true)
    {
        /** @var BaseActiveRecord $owner */
        $owner = $this->owner;
        $relation = $owner->getRelation($name, false);
        if (in_array($name, $this->_relations) && !is_null($relation)) {
            return true;
        }
        return parent::canSetProperty($name, $checkVars);
    }
public function canSetProperty ( $ name , $ checkVars = true ) { /** @var BaseActiveRecord $owner */ $ owner = $ this -> owner ; $ relation = $ owner -> getRelation ( $ name , false ) ; if ( in_array ( $ name , $ this -> _relations ) && ! is_null ( $ relation ) ) { return true ; } return parent :: canSetProperty ( $ name , $ checkVars ) ; }
Override canSetProperty method to be able to detect if a relation setter is allowed.
Setter is allowed if the relation is declared in the `relations` parameter
@param string $name
@param boolean $checkVars
@return boolean
Override canSetProperty method to be able to detect if a relation setter is allowed . Setter is allowed if the relation is declared in the relations parameter