TheWebmen\PickerField\Controllers\PickerField::__construct
Usage [e.g. in getCMSFields] $field = new PickerField('Authors', 'Selected Authors', $this->Authors(), 'Select Author(s)');
Signature
public function __construct(string
$name,
[string
$title = NULL,
[SS_List
$dataList = NULL,
[string
$linkExistingTitle = NULL,
[string
$sortField = NULL]]]] )
Parameters
$name
—
string
- - Name of field (typically the relationship method)
$title
—
string
- - GridField Title
$dataList
—
SilverStripe\ORM\SS_List
- - Result of the relationship component method (E.g. $this->Authors())
$linkExistingTitle
—
string
- - AddExisting Button Title
$sortField
—
string
- - Field to sort on. Be sure it exists in the $many_many_extraFields static