Hello,
I have read through the docs but I couldn't find anything.
I would like to replace the default button name for "GridFieldAddNewButton". At the moment it is "Add Gallery Object".
How can I replace it to "Add New"
There is a function SetButtonName but I don't know when to call it.
http://api.silverstripe.org/3.0/class-GridFieldAddNewButton.html
Here is the code
$gridFieldConfig = GridFieldConfig::create()->addComponents(
new GridFieldToolbarHeader(),
new GridFieldAddNewButton('toolbar-header-right'),
new GridFieldSortableHeader(),
new GridFieldDataColumns(),
new GridFieldPaginator(10),
new GridFieldEditButton(),
new GridFieldDeleteAction(),
new GridFieldDetailForm()
);
//public function __construct($name, $title = null, SS_List $dataList = null, GridFieldConfig $config = null) {
$gridField = new GridField("GalleryObject", "Images", $this->GalleryObjects(), $gridFieldConfig);
return $gridField;