コード例 #1
0
 public function get_format_data_structure()
 {
     $datas = cms_section::get_format_data_structure(false, false);
     $datas[] = array('var' => "link", 'desc' => $this->msg['cms_module_sectionslist_view_carousel_link_desc']);
     $format_datas = array(array('var' => "id", 'desc' => $this->msg['cms_module_carousel_view_carousel_id_desc']), array('var' => "records", 'desc' => $this->msg['cms_module_carousel_view_carousel_records_desc'], 'children' => $this->prefix_var_tree($datas, "records[i]")));
     return $format_datas;
 }
 public function get_format_data_structure()
 {
     $datas = cms_section::get_format_data_structure();
     $datas[] = array('var' => "link", 'desc' => $this->msg['cms_module_metadatas_datasource_metadatas_section_link_desc']);
     $format_datas = array(array('var' => "details", 'desc' => $this->msg['cms_module_metadatas_datasource_metadatas_section_section_desc'], 'children' => $this->prefix_var_tree($datas, "details")));
     $format_datas = array_merge(parent::get_format_data_structure(), $format_datas);
     return $format_datas;
 }
コード例 #3
0
 public function get_format_data_structure()
 {
     $format = array();
     $format[] = array('var' => "title", 'desc' => $this->msg['cms_module_common_view_title']);
     $sections = array('var' => "sections", 'desc' => $this->msg['cms_module_common_view_section_desc'], 'children' => $this->prefix_var_tree(cms_section::get_format_data_structure(), "sections[i]"));
     $sections['children'][] = array('var' => "sections[i].link", 'desc' => $this->msg['cms_module_common_view_section_link_desc']);
     $format[] = $sections;
     return $format;
 }
コード例 #4
0
 public function get_format_data_structure()
 {
     //dans ce cas là, c'est assez simple, c'est la vue qui va chercher les données...
     $format = array();
     $format[] = array('var' => 'home', 'desc' => "", 'children' => array(array('var' => "home.title", 'desc' => $this->msg['cms_module_common_view_home_title_desc']), array('var' => "home.link", 'desc' => $this->msg['cms_module_common_view_home_link_desc'])));
     $sections = array('var' => "sections", 'desc' => $this->msg['cms_module_common_view_section_desc'], 'children' => $this->prefix_var_tree(cms_section::get_format_data_structure(false, false), "sections[i]"));
     $sections['children'][] = array('var' => "sections[i].link", 'desc' => $this->msg['cms_module_common_view_section_link_desc']);
     $format[] = $sections;
     return $format;
 }
コード例 #5
0
ファイル: cms_editorial.class.php プロジェクト: hogsim/PMB
 public static function get_format_data_structure($type, $full = true)
 {
     global $msg;
     $main_fields = array();
     $main_fields[] = array('var' => "id", 'desc' => $msg['cms_module_common_datasource_desc_id_' . $type]);
     if ($type == "section") {
         $main_fields[] = array('var' => "num_parent", 'desc' => $msg['cms_module_common_datasource_desc_num_parent']);
     } else {
         $main_fields[] = array('var' => "parent", 'desc' => $msg['cms_module_common_datasource_desc_parent'], 'children' => self::prefix_var_tree(cms_section::get_format_data_structure(false, false), "parent"));
     }
     $main_fields[] = array('var' => "title", 'desc' => $msg['cms_module_common_datasource_desc_title']);
     $main_fields[] = array('var' => "resume", 'desc' => $msg['cms_module_common_datasource_desc_resume']);
     if ($type == "article") {
         $main_fields[] = array('var' => "content", 'desc' => $msg['cms_module_common_datasource_desc_content']);
     }
     $main_fields[] = array('var' => "logo", 'children' => self::prefix_var_tree(cms_logo::get_format_data_structure(false, false), "logo"), 'desc' => $msg['cms_module_common_datasource_desc_logo']);
     $main_fields[] = array('var' => "publication_state", 'desc' => $msg['cms_module_common_datasource_desc_publication_state']);
     $main_fields[] = array('var' => "start_date", 'desc' => $msg['cms_module_common_datasource_desc_start_date']);
     $main_fields[] = array('var' => "end_date", 'desc' => $msg['cms_module_common_datasource_desc_end_date']);
     $main_fields[] = array('var' => "descriptors", 'desc' => $msg['cms_module_common_datasource_desc_descriptors'], 'children' => array(array('var' => "descriptors[i].id", 'desc' => $msg['cms_module_common_datasource_desc_descriptors_id']), array('var' => "descriptors[i].name", 'desc' => $msg['cms_module_common_datasource_desc_descriptors_name']), array('var' => "descriptors[i].comment", 'desc' => $msg['cms_module_common_datasource_desc_descriptors_comment']), array('var' => "descriptors[i].lang", 'desc' => $msg['cms_module_common_datasource_desc_descriptors_lang'])));
     $main_fields[] = array('var' => "type", 'desc' => $msg['cms_module_common_datasource_desc_type_' . $type]);
     $main_fields[] = array('var' => "fields_type", 'desc' => $msg['cms_module_common_datasource_desc_fields_type_' . $type]);
     $main_fields[] = array('var' => "create_date", 'desc' => $msg['cms_module_common_datasource_desc_create_date']);
     //pour les types de contenu
     $fields_type = array();
     $types = new cms_editorial_types($type);
     $fields_type = $types->get_format_data_structure($full);
     return array(array('var' => $msg['cms_module_common_datasource_main_fields'], "children" => $main_fields), array('var' => "nb_documents", 'desc' => $msg['cms_module_common_datasource_desc_nb_documents']), array('var' => "documents", 'desc' => $msg['cms_module_common_datasource_desc_documents'], 'children' => self::prefix_var_tree(cms_document::get_format_data_structure(), "documents[i]")), array('var' => $msg['cms_module_common_datasource_types'], 'desc' => $msg['cms_module_common_datasource_desc_types'], "children" => $fields_type));
 }
コード例 #6
0
 public function get_format_data_structure()
 {
     return array(array('var' => "items", 'desc' => $this->msg['cms_module_menu_datasource_menu_items_desc'], 'children' => array(array('var' => "items[i].id", 'desc' => $this->msg['cms_module_menu_datasource_menu_item_id_desc']), array('var' => "items[i].title", 'desc' => $this->msg['cms_module_menu_datasource_menu_item_title_desc']), array('var' => "items[i].link", 'desc' => $this->msg['cms_module_menu_datasource_menu_item_link_desc']), array('var' => "items[i].details", 'desc' => $this->msg['cms_module_menu_datasource_menu_item_details_desc'], 'children' => cms_editorial::prefix_var_tree(cms_section::get_format_data_structure(false, false, false), "items[i].details")), array('var' => "items[i].children", 'desc' => $this->msg['cms_module_menu_datasource_menu_item_children_desc']))));
 }
コード例 #7
0
 public static function get_format_data_structure($get_children = true, $get_articles = true, $full = true, $get_parent = false)
 {
     global $msg;
     $format = cms_editorial::get_format_data_structure("section", $full);
     if ($get_parent) {
         $format[] = array('var' => "parent", 'desc' => $msg['cms_editorial_desc_parent_section'], 'children' => self::prefix_var_tree(cms_section::get_format_data_structure(false, false), "parent"));
     }
     if ($get_children) {
         $format[] = array('var' => 'children', 'desc' => $msg['cms_editorial_desc_children'], 'children' => self::prefix_var_tree(cms_section::get_format_data_structure(false, false), "children[i]"));
     }
     if ($get_articles) {
         $format[] = array('var' => 'articles', 'desc' => $msg['cms_editorial_desc_articles'], 'children' => self::prefix_var_tree(cms_article::get_format_data_structure(), "articles[i]"));
     }
     return $format;
 }
コード例 #8
0
 public function get_format_data_structure()
 {
     return cms_section::get_format_data_structure(true, true, true, true);
 }