2012-02-09 16:02:47 +13:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class GridFieldTitle implements GridField_HTMLProvider {
|
2012-03-06 11:19:46 +13:00
|
|
|
|
|
|
|
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(
|
2012-03-06 11:19:46 +13:00
|
|
|
'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
|
|
|
);
|
|
|
|
}
|
2012-03-06 11:19:46 +13:00
|
|
|
|
|
|
|
function getNewEnabled() {
|
|
|
|
return $this->newEnabled;
|
|
|
|
}
|
|
|
|
|
|
|
|
function setNewEnabled($enabled) {
|
|
|
|
$this->newEnabled = $enabled;
|
|
|
|
}
|
2012-02-09 16:02:47 +13:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|