public function loadRelations($data)
    {
        /** @var BaseActiveRecord $owner */
        $owner = $this->owner;
        foreach ($this->_relations as $relationName) {
            $keyName = $this->_getRelationKeyName($relationName);
            if (array_key_exists($keyName, $data)) {
                $owner->{$relationName} = $data[$keyName];
            }
        }
    }
public function loadRelations($data)
    {
        /** @var BaseActiveRecord $owner */
        $owner = $this->owner;
        foreach ($this->_relations as $relationName) {
            $keyName = $this->_getRelationKeyName($relationName);
            if (array_key_exists($keyName, $data)) {
                $owner->{$relationName} = $data[$keyName];
            }
        }
    }
public function loadRelations ( $ data ) { /** @var BaseActiveRecord $owner */ $ owner = $ this -> owner ; foreach ( $ this -> _relations as $ relationName ) { $ keyName = $ this -> _getRelationKeyName ( $ relationName ) ; if ( array_key_exists ( $ keyName , $ data ) ) { $ owner -> { $ relationName } = $ data [ $ keyName ] ; } } }
Populates relations with input data
@param array $data
@throws InvalidConfigException
Populates relations with input data