public function getModelRelations($model, $extraFields)
    {
        $relations = parent::getModelRelations($model, $extraFields);
        if (($relationName = Yii::$app->request->getQueryParam('_pjax')) !== null
            && ($relationName = substr($relationName, 1, -4)) !== ''
            && isset($relations[$relationName])
        ) {
            $headers = Yii::$app->request->getHeaders();
            $selection = [
                'add' => self::explodeEscaped(self::KEYS_SEPARATOR, $headers->get('X-Selection-add')),
                'remove' => self::explodeEscaped(self::KEYS_SEPARATOR, $headers->get('X-Selection-remove')),
            ];
            $relations[$relationName] = $this->addRelationSelection(
                $relations[$relationName],
                $selection
            );
        }
        foreach ($relations as $relationName => &$relation) {
            $relation['buttons'] = $this->getRelationButtons($relationName, $relation, $model);
        }
        return $relations;
    }
public function getModelRelations($model, $extraFields)
    {
        $relations = parent::getModelRelations($model, $extraFields);
        if (($relationName = Yii::$app->request->getQueryParam('_pjax')) !== null
            && ($relationName = substr($relationName, 1, -4)) !== ''
            && isset($relations[$relationName])
        ) {
            $headers = Yii::$app->request->getHeaders();
            $selection = [
                'add' => self::explodeEscaped(self::KEYS_SEPARATOR, $headers->get('X-Selection-add')),
                'remove' => self::explodeEscaped(self::KEYS_SEPARATOR, $headers->get('X-Selection-remove')),
            ];
            $relations[$relationName] = $this->addRelationSelection(
                $relations[$relationName],
                $selection
            );
        }
        foreach ($relations as $relationName => &$relation) {
            $relation['buttons'] = $this->getRelationButtons($relationName, $relation, $model);
        }
        return $relations;
    }
public function getModelRelations ( $ model , $ extraFields ) { $ relations = parent :: getModelRelations ( $ model , $ extraFields ) ; if ( ( $ relationName = Yii :: $ app -> request -> getQueryParam ( '_pjax' ) ) !== null && ( $ relationName = substr ( $ relationName , 1 , - 4 ) ) !== '' && isset ( $ relations [ $ relationName ] ) ) { $ headers = Yii :: $ app -> request -> getHeaders ( ) ; $ selection = [ 'add' => self :: explodeEscaped ( self :: KEYS_SEPARATOR , $ headers -> get ( 'X-Selection-add' ) ) , 'remove' => self :: explodeEscaped ( self :: KEYS_SEPARATOR , $ headers -> get ( 'X-Selection-remove' ) ) , ] ; $ relations [ $ relationName ] = $ this -> addRelationSelection ( $ relations [ $ relationName ] , $ selection ) ; } foreach ( $ relations as $ relationName => & $ relation ) { $ relation [ 'buttons' ] = $ this -> getRelationButtons ( $ relationName , $ relation , $ model ) ; } return $ relations ; }
Adds query conditions to include related models selection.
Adds buttons definition to relation data.
@inheritdoc
Adds query conditions to include related models selection . Adds buttons definition to relation data .