mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
15 lines
430 B
PHP
Executable File
15 lines
430 B
PHP
Executable File
<?php
|
|
|
|
class GridFieldConfig_AddByDBField extends GridFieldConfig_RecordEditor {
|
|
|
|
public function __construct($itemsPerPage = null, $dataObjectField = "Title") {
|
|
parent::__construct($itemsPerPage);
|
|
|
|
// Remove uneccesary components
|
|
$this->removeComponentsByType("GridFieldAddNewButton");
|
|
|
|
// Add new components
|
|
$this->addComponent(new GridFieldAddByDBField("buttons-before-left", $dataObjectField));
|
|
}
|
|
|
|
} |