Example #1
0
 public static function isHidden($id)
 {
     static $q = null;
     createStaticQuery($q, "SELECT hidden,parent_id FROM cf_page WHERE id=:id");
     $res = query2array($q, array('id' => $id));
     return $res['hidden'] ? true : ($res['parent_id'] ? Page::isHidden($res['parent_id']) : false);
 }
Example #2
0
 /**
  * Check and update the given process page for hidden/visible status depending on useBookmarks setting
  *
  * @param Process $process
  * @param Page $page
  *
  */
 public function checkProcessPage(Page $page)
 {
     $hidden = $page->isHidden();
     if ($this->process->useBookmarks) {
         if ($hidden) {
             $page->removeStatus(Page::statusHidden);
             $page->save();
         }
     } else {
         if (!$hidden) {
             $page->addStatus(Page::statusHidden);
             $page->save();
         }
     }
 }