yii\base\ArrayableTrait::extraFields PHP Method

extraFields() public method

This method is similar to ArrayableTrait::fields except that the list of fields returned by this method are not returned by default by ArrayableTrait::toArray. Only when field names to be expanded are explicitly specified when calling ArrayableTrait::toArray, will their values be exported. The default implementation returns an empty array. You may override this method to return a list of expandable fields based on some context information (e.g. the current application user).
See also: toArray()
See also: fields()
public extraFields ( ) : array
return array the list of expandable field names or field definitions. Please refer to [[fields()]] on the format of the return value.
    public function extraFields()
    {
        return [];
    }