Skip to content

Commit

Permalink
API Machine-friendly name for CMS states navigator (stages).
Browse files Browse the repository at this point in the history
Used programmatically by the side-by-side state switcher.
  • Loading branch information
mateusz authored and chillu committed Dec 10, 2012
1 parent aaae8c9 commit 47f41d8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/controllers/SilverStripeNavigator.php
Expand Up @@ -126,6 +126,13 @@ public function getHTML() {}
*/
public function getTitle() {}

/**
* Machine-friendly name.
*/
public function getName() {
return substr(get_class($this), strpos(get_class($this), '_')+1);
}

/**
* Optional link to a specific view of this record.
* Not all items are simple links, please use {@link getHTML()}
Expand Down

0 comments on commit 47f41d8

Please sign in to comment.