XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
addon.admin.view.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 
8 class addonAdminView extends addon
9 {
10 
16  function init()
17  {
18  $this->setTemplatePath($this->module_path . 'tpl');
19  }
20 
27  {
28  $oAdminModel = getAdminModel('admin');
29 
30  // Add to the list settings
31  $oAddonModel = getAdminModel('addon');
32  $addon_list = $oAddonModel->getAddonListForSuperAdmin();
33 
34  $security = new Security($addon_list);
35  $addon_list = $security->encodeHTML('..', '..author..');
36 
37  foreach($addon_list as $no => $addon_info)
38  {
39  $addon_list[$no]->description = nl2br(trim($addon_info->description));
40  }
41 
42  Context::set('addon_list', $addon_list);
43  Context::set('addon_count', count($addon_list));
44  // Template specifies the path and file
45  $this->setTemplateFile('addon_list');
46  }
47 
54  {
55  $site_module_info = Context::get('site_module_info');
56  // Wanted to add the requested
57  $selected_addon = Context::get('selected_addon');
58  // Wanted to add the requested information
59  $oAddonModel = getAdminModel('addon');
60  $addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl, 'site');
61  Context::set('addon_info', $addon_info);
62  // Get a mid list
63  $oModuleModel = getModel('module');
64  $oModuleAdminModel = getAdminModel('module');
65 
66  $args = new stdClass();
67  if($site_module_info->site_srl)
68  {
69  $args->site_srl = $site_module_info->site_srl;
70  }
71  $columnList = array('module_srl', 'module_category_srl', 'mid', 'browser_title');
72  $mid_list = $oModuleModel->getMidList($args, $columnList);
73  // module_category and module combination
74  if(!$site_module_info->site_srl)
75  {
76  // Get a list of module categories
77  $module_categories = $oModuleModel->getModuleCategories();
78 
79  if(is_array($mid_list))
80  {
81  foreach($mid_list as $module_srl => $module)
82  {
83  $module_categories[$module->module_category_srl]->list[$module_srl] = $module;
84  }
85  }
86  }
87  else
88  {
89  $module_categories = array();
90  $module_categories[0] = new stdClass();
91  $module_categories[0]->list = $mid_list;
92  }
93 
94  Context::set('mid_list', $module_categories);
95 
96  // Template specifies the path and file
97  $this->setTemplateFile('setup_addon');
98 
99  if(Context::get('module') != 'admin')
100  {
101  $this->setLayoutPath('./common/tpl');
102  $this->setLayoutFile('popup_layout');
103  }
104 
105  $security = new Security();
106  $security->encodeHTML('addon_info.', 'addon_info.author..', 'mid_list....');
107  }
108 
115  {
116  $site_module_info = Context::get('site_module_info');
117  // Wanted to add the requested
118  $selected_addon = Context::get('selected_addon');
119  // Wanted to add the requested information
120  $oAddonModel = getAdminModel('addon');
121  $addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl);
122  Context::set('addon_info', $addon_info);
123  // Set the layout to be pop-up
124  $this->setLayoutFile('popup_layout');
125  // Template specifies the path and file
126  $this->setTemplateFile('addon_info');
127 
128  $security = new Security();
129  $security->encodeHTML('addon_info.', 'addon_info.author..');
130  }
131 
132 }
133 /* End of file addon.admin.view.php */
134 /* Location: ./modules/addon/addon.admin.view.php */
setTemplateFile($filename)
$oModuleModel
Definition: ko.install.php:236
setLayoutFile($filename)
set($key, $val, $set_to_get_vars=0)
$module_srl
integer value to represent a run-time instance of Module (XE Module)
$args
Definition: ko.install.php:185
getAdminModel($module_name)
Definition: func.inc.php:156
getModel($module_name)
Definition: func.inc.php:145
$module
Class name of Xe Module that is identified by mid.