コード例 #1
0
 public function save_new_template($fields, $child = true)
 {
     $template = $child && isset($this->template->child) ? $this->template->child : $this->template;
     nc_create_folder($template->absolute_path);
     $this->save_fields($fields, $template);
     $template->update_file_path_and_mode();
 }
コード例 #2
0
 public function create($type, $settings)
 {
     $path = $this->template->path_to_root_folder . '/' . $this->id . '/' . $type;
     nc_create_folder(nc_standardize_path_to_folder($path));
     foreach ($settings as $field_name => $tmp) {
         nc_save_file(nc_standardize_path_to_file($path . '/' . $field_name . $this->template->extension), $settings[$field_name]);
     }
 }
コード例 #3
0
 public function save_new_class($id = null, $fld_content = null)
 {
     if ($id) {
         $this->template->load_child($id);
         $template = $this->template->child;
     } else {
         $template = $this->template;
     }
     nc_create_folder($template->absolute_path);
     $this->save_fields(false, $template, $fld_content);
     $template->update_file_path_and_mode();
 }
コード例 #4
0
 public function save_new($params)
 {
     nc_create_folder($this->template->absolute_path);
     $this->save_fields($params);
     $this->template->update_file_path_and_mode();
 }