コード例 #1
0
ファイル: Provider.php プロジェクト: robbytaylor/boom-core
 /**
  * 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);
 }
コード例 #2
0
ファイル: Provider.php プロジェクト: boomcms/boom-core
 /**
  * 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);
 }
コード例 #3
0
ファイル: Html.php プロジェクト: imanghafoori1/boom-core
 protected function show()
 {
     return Editor::isEnabled() ? $this->editLink() : $this->getContent();
 }
コード例 #4
0
 protected function getNavigationVisibilityColumn()
 {
     return Editor::isEnabled() ? 'visible_in_nav_cms' : 'visible_in_nav';
 }
コード例 #5
0
 public function shouldBeApplied()
 {
     return $this->apply === true || $this->apply === null && !Editor::isEnabled();
 }