如何更改 Gridfield
添加按钮的默认按钮文本?
我想这与 ->getConfig()
有关,有什么想法吗?
最佳答案
通过以下示例之一更改 Gridfield 添加按钮的默认按钮文本:
//$gridfield = ..... // define you gridfield as normal first...then
$gridfield->getConfig()->getComponentByType('GridFieldAddNewButton')->setButtonName('Add Extra Product Gallery Images');
或者将其添加到您的数据对象中:
static $singular_name = "Add Extra Product Gallery Image";
static $plural_name = "Add Extra Product Gallery Images";
关于Silverstripe 3.1 更改 Gridfield 添加按钮的默认按钮文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29183998/