mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch 'stefanX201-patch-3' into 3.1
This commit is contained in:
commit
e92896016f
@ -67,8 +67,8 @@ __Example: using a subclass__
|
||||
// return either true or false
|
||||
}
|
||||
|
||||
public function getStatusFlags(){
|
||||
$flags = parent::getStatusFlags();
|
||||
public function getStatusFlags($cached = true) {
|
||||
$flags = parent::getStatusFlags($cached);
|
||||
$flags['scheduledtopublish'] = "Scheduled To Publish";
|
||||
return $flags;
|
||||
}
|
||||
@ -78,4 +78,4 @@ The above subclass of `[api:SiteTree]` will add a new flag for indicating its
|
||||
__'Scheduled To Publish'__ status. The look of the page node will be changed
|
||||
from ![Normal Page Node](../_images/page_node_normal.png) to ![Scheduled Page Node](../_images/page_node_scheduled.png). The getStatusFlags has an `updateStatusFlags()`
|
||||
extension point, so the flags can be modified through `DataExtension` rather than
|
||||
inheritance as well. Deleting existing flags works by simply unsetting the array key.
|
||||
inheritance as well. Deleting existing flags works by simply unsetting the array key.
|
||||
|
Loading…
Reference in New Issue
Block a user