XpressEngine Core
1.11.2
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
modules
addon
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
26
function
dispAddonAdminIndex
()
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
53
function
dispAddonAdminSetup
()
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
114
function
dispAddonAdminInfo
()
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 */
ModuleObject\setTemplateFile
setTemplateFile($filename)
Definition:
ModuleObject.class.php:252
$oModuleModel
$oModuleModel
Definition:
ko.install.php:236
addon
Definition:
addon.class.php:8
ModuleObject\setLayoutFile
setLayoutFile($filename)
Definition:
ModuleObject.class.php:330
Context\set
set($key, $val, $set_to_get_vars=0)
Definition:
Context.class.php:1948
addonAdminView\init
init()
Definition:
addon.admin.view.php:16
ModuleObject\$module_srl
$module_srl
integer value to represent a run-time instance of Module (XE Module)
Definition:
ModuleObject.class.php:14
$args
$args
Definition:
ko.install.php:185
getAdminModel
getAdminModel($module_name)
Definition:
func.inc.php:156
addonAdminView\dispAddonAdminIndex
dispAddonAdminIndex()
Definition:
addon.admin.view.php:26
Security
Definition:
Security.class.php:11
getModel
getModel($module_name)
Definition:
func.inc.php:145
ModuleObject\setLayoutPath
setLayoutPath($path)
Definition:
ModuleObject.class.php:354
Context\get
get($key)
Definition:
Context.class.php:1973
ModuleObject\setTemplatePath
setTemplatePath($path)
Definition:
ModuleObject.class.php:275
addonAdminView
Definition:
addon.admin.view.php:8
ModuleObject\$module
$module
Class name of Xe Module that is identified by mid.
Definition:
ModuleObject.class.php:13
addonAdminView\dispAddonAdminInfo
dispAddonAdminInfo()
Definition:
addon.admin.view.php:114
addonAdminView\dispAddonAdminSetup
dispAddonAdminSetup()
Definition:
addon.admin.view.php:53
Generated on Tue Dec 18 2018 17:04:28 for XpressEngine Core by
1.8.5