mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
25 lines
496 B
PHP
25 lines
496 B
PHP
<?php
|
|
|
|
class GridFieldTitle implements GridField_HTMLProvider {
|
|
|
|
protected $newEnabled = true;
|
|
|
|
function getHTMLFragments($gridField) {
|
|
return array(
|
|
'header' => $gridField->customise(array(
|
|
'NewLink' => Controller::join_links($gridField->Link('item'), 'new'),
|
|
'NewEnabled' => $this->getNewEnabled()
|
|
))->renderWith('GridFieldTitle')
|
|
);
|
|
}
|
|
|
|
function getNewEnabled() {
|
|
return $this->newEnabled;
|
|
}
|
|
|
|
function setNewEnabled($enabled) {
|
|
$this->newEnabled = $enabled;
|
|
}
|
|
}
|
|
|
|
?>
|