示例#1
0
文件: add.php 项目: bosoy83/progtest
 public function __construct($template = NULL, array $partials = NULL)
 {
     parent::__construct($template, $partials);
     $this->is_category = $this->is_object = FALSE;
     // Узнаем, что мы добавляем - объект или категорию
     if (!empty($this->is_business)) {
         $this->is_object = TRUE;
     } else {
         if (!empty($this->lvl0)) {
             $this->is_category = TRUE;
         } else {
             $this->is_object = TRUE;
         }
     }
     $this->title .= ' :: Создание ' . (!empty($this->is_category) ? 'категории' : 'объекта');
 }
示例#2
0
文件: edit.php 项目: bosoy83/progtest
 public function __construct($template = NULL, array $partials = NULL)
 {
     // Шаблон берем от метода Add
     $template = 'admin/catalog/add';
     parent::__construct($template, $partials);
     $this->is_category = $this->is_object = FALSE;
     // Узнаем, что мы добавляем - объект или категорию
     if (!empty($this->is_business)) {
         $this->is_object = TRUE;
     } else {
         if (!empty($this->lvl1)) {
             $this->is_category = TRUE;
         } else {
             $this->is_object = TRUE;
         }
     }
     $this->title .= ' :: Редактирование ' . (!empty($this->is_category) ? 'категории' : 'объекта');
 }