Moo\HasOneSelector\Form\GridField
Class GridField instance of grid field.
Synopsis
class GridField
extends GridField
{
- // members
- protected string $dataClass = '';
- protected $owner = NULL;
- protected string $emptyString = 'No item selected';
- protected $valueField = NULL;
- // methods
- public void __construct()
- public void setValueHolderField()
- public void setDisplayFields()
- public void setFieldFormatting()
- public void setEmptyString()
- public void setDataClass()
- public void getDataClass()
- public void getRecord()
- public void setRecord()
- public void setOwner()
- public void getOwner()
- public SS_List getList()
- public void getManipulatedList()
- protected string getOptionalTableBody()
- protected void getRelationName()
- protected void storeRelationInSession()
- protected void loadRelationFromSession()
- protected void getSessionName()
- public static void formatSessionName()
Hierarchy
Extends
- SilverStripe\Forms\GridField\GridField
Members
protected
-
$dataClass
Name of the list data class. -
$emptyString
Text to display when no record selected. -
$owner
Instance of data object that contains the has one relation. -
$valueField
Instance of form field that holds the value.
Methods
protected
- getOptionalTableBody()
- getRelationName() — Get relation name within the owner object. This includes the "ID" at the end.
- getSessionName() — Get session name for current owner to store relation value.
- loadRelationFromSession() — Load relation value from data stored in session.
- storeRelationInSession() — Store relation value in session.
public
- __construct() — HasOneSelector GridField constructor.
- formatSessionName() — Get formatted name for session to store relation value.
- getDataClass() — Get the name of the data class for current list.
- getList() — Get the data source.
- getManipulatedList() — Get the data source after applying every {@link GridField_DataManipulator} to it.
- getOwner() — Get instance of data object that has the has one relation.
- getRecord() — Get the record of the has one relation for current owner object.
- setDataClass() — set the name of the data class for current list.
- setDisplayFields() — Defined the columns to be rendered in the field.
- setEmptyString() — Set empty string when no record selected.
- setFieldFormatting() — Apply transformation of the displayed data within a specific column(s).
- setOwner() — Set instance of data object that has the has one relation.
- setRecord() — Set the record of the has one relation for current owner object.
- setValueHolderField() — Set instance of value holder field.