/** * 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); }
/** * 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() && $this->gate->allows('edit', $page); }
protected function show() { return Editor::isEnabled() ? $this->editLink() : $this->getContent(); }
protected function getNavigationVisibilityColumn() { return Editor::isEnabled() ? 'visible_in_nav_cms' : 'visible_in_nav'; }
public function shouldBeApplied() { return $this->apply === true || $this->apply === null && !Editor::isEnabled(); }