Interface luya\admin\ngrest\base\NgRestRelationInterface

Implemented byluya\admin\ngrest\base\NgRestRelation

NgRest Relation Interface.

Each relation definition must be an instance of this class.

Public Methods

Hide inherited methods

Method Description Defined By
getApiEndpoint() Get the api endpoint for the relation in order to make the relation data call. luya\admin\ngrest\base\NgRestRelationInterface
getArrayIndex() Get the array index of the relation in the relations array. luya\admin\ngrest\base\NgRestRelationInterface
getDataProvider() luya\admin\ngrest\base\NgRestRelationInterface
getLabel() Get the label of the relation. luya\admin\ngrest\base\NgRestRelationInterface
getModelClass() Get the encoded model class name. luya\admin\ngrest\base\NgRestRelationInterface
getRelationLink() Get relation link informations. luya\admin\ngrest\base\NgRestRelationInterface
getTabLabelAttribute() Returns the tab label attribute name. luya\admin\ngrest\base\NgRestRelationInterface
getTargetModel() Get the target model class path. luya\admin\ngrest\base\NgRestRelationInterface
setArrayIndex() Set the index of the relation in the relations array. luya\admin\ngrest\base\NgRestRelationInterface
setModelClass() Set the model class of the current ngRestModel. luya\admin\ngrest\base\NgRestRelationInterface
setTargetModel() Set the target model class. luya\admin\ngrest\base\NgRestRelationInterface

Method Details

Hide inherited methods

getApiEndpoint() public abstract method

Get the api endpoint for the relation in order to make the relation data call.

public abstract void getApiEndpoint ( )

                public function getApiEndpoint();

            
getArrayIndex() public abstract method

Get the array index of the relation in the relations array.

public abstract void getArrayIndex ( )

                public function getArrayIndex();

            
getDataProvider() public abstract method

public abstract yii\db\QueryInterface getDataProvider ( )

                public function getDataProvider();

            
getLabel() public abstract method

Get the label of the relation.

public abstract void getLabel ( )

                public function getLabel();

            
getModelClass() public abstract method

Get the encoded model class name.

public abstract void getModelClass ( )

                public function getModelClass();

            
getRelationLink() public abstract method

Get relation link informations.

public abstract void getRelationLink ( )

getTabLabelAttribute() public abstract method

Returns the tab label attribute name.

In order to change the tab label, any of the available and exposed attributes can be taken. The attribute must be defined in {{luya\admin\ngrest\base\NgRestModel::ngRestScopes()}} list scope. The tab can only display labels which are returned by the API.

public abstract void getTabLabelAttribute ( )

                public function getTabLabelAttribute();

            
getTargetModel() public abstract method (available since version 2.0.0)

Get the target model class path.

public abstract string getTargetModel ( )

                public function getTargetModel();

            
setArrayIndex() public abstract method

Set the index of the relation in the relations array.

public abstract void setArrayIndex ( $arrayIndex )
$arrayIndex integer

                public function setArrayIndex($arrayIndex);

            
setModelClass() public abstract method

Set the model class of the current ngRestModel.

public abstract void setModelClass ( $modelClass )
$modelClass string

                public function setModelClass($modelClass);

            
setTargetModel() public abstract method (available since version 2.0.0)

Set the target model class.

public abstract void setTargetModel ( $targetModel )
$targetModel string

                public function setTargetModel($targetModel);