Example #1
0
 public function __construct($catalogue_id = false)
 {
     self::$instanse = $this;
     $nc_core = nc_Core::get_object();
     $this->template = new nc_tpl($nc_core->MODULE_TEMPLATE_FOLDER, $nc_core->db);
 }
Example #2
0
 /**
  * @param bool $make_catalogue_dir
  * @return string
  */
 private function get_absolute_path_to_template($make_catalogue_dir = false)
 {
     $abs_path = nc_standardize_path_to_folder($this->path_to_root_folder . '/' . $this->relative_path);
     $module_editor = new nc_module_editor();
     if ($this->catalogue_id && array_key_exists($this->type, $module_editor->get_module_types())) {
         if (!file_exists($abs_path . $this->catalogue_id)) {
             if (!$make_catalogue_dir) {
                 return $abs_path;
             }
             mkdir($abs_path . $this->catalogue_id);
         }
         $abs_path .= $this->catalogue_id . '/';
     }
     return $abs_path;
 }