25 lines
496 B
PHP
Raw Normal View History

2012-02-09 16:02:47 +13:00
<?php
class GridFieldTitle implements GridField_HTMLProvider {
protected $newEnabled = true;
2012-02-09 16:02:47 +13:00
function getHTMLFragments($gridField) {
return array(
2012-02-20 14:50:53 +13:00
'header' => $gridField->customise(array(
'NewLink' => Controller::join_links($gridField->Link('item'), 'new'),
'NewEnabled' => $this->getNewEnabled()
2012-02-20 14:50:53 +13:00
))->renderWith('GridFieldTitle')
2012-02-09 16:02:47 +13:00
);
}
function getNewEnabled() {
return $this->newEnabled;
}
function setNewEnabled($enabled) {
$this->newEnabled = $enabled;
}
2012-02-09 16:02:47 +13:00
}
?>