Exemplo n.º 1
0
 /**
  * Return existence of children of this category
  *
  * @param string  $type Page type
  * @param integer $id   Page ID
  *
  * @return boolean
  */
 protected function hasChild($type, $id)
 {
     if (static::PAGE_STATIC_PAGE == $type) {
         $cnt = \XLite\Core\Database::getRepo('XLite\\Module\\CDev\\SimpleCMS\\Model\\Page')->countBy(array('enabled' => true));
         $result = $cnt > 0;
     } else {
         $result = parent::hasChild($type, $id);
     }
     return $result;
 }