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