Example #1
0
 /**
  * Returns whether the logged in user is allowed to edit a page.
  *
  * @return bool
  */
 public function allowedToEdit(Page $page = null)
 {
     if ($page === null) {
         return true;
     }
     return Editor::isEnabled() && Editor::isEditable($page);
 }