Update README.md
Added canEdit check in BetterNavigatorEditLink example. Co-authored-by: Jono Menz <jonomenz@gmail.com>
This commit is contained in:
parent
fffb43cc2f
commit
f431417fd1
|
@ -94,7 +94,8 @@ There may be occasions when you wish to override the "Edit in CMS" link. For exa
|
|||
*/
|
||||
public function BetterNavigatorEditLink()
|
||||
{
|
||||
return CMSEditLinkAPI::find_edit_link_for_object($this->displayedEvent());
|
||||
$event = $this->displayedEvent();
|
||||
return $event->canEdit() ? CMSEditLinkAPI::find_edit_link_for_object($event) : false;
|
||||
}
|
||||
````
|
||||
|
||||
|
|
Loading…
Reference in New Issue