XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
widget.admin.view.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class widgetAdminView extends widget
9 {
13  function init()
14  {
15  $this->setTemplatePath($this->module_path.'tpl');
16  }
17 
22  {
23  // Set widget list
24  $oWidgetModel = getModel('widget');
25  $widget_list = $oWidgetModel->getDownloadedWidgetList();
26 
27  $security = new Security($widget_list);
28  $widget_list = $security->encodeHTML('..', '..author..');
29 
30  foreach($widget_list as $no => $widget)
31  {
32  if($widget->widget)
33  {
34  $widget_list[$no]->description = nl2br(trim($widget->description));
35  }
36  else
37  {
38  unset($widget_list[$no]);
39  }
40  }
41 
42  Context::set('widget_list', $widget_list);
43  Context::set('tCount', count($widget_list));
44 
45  $this->setTemplateFile('downloaded_widget_list');
46  }
47 
49  {
50  $oView = getView('widget');
51  Context::set('in_admin', true);
52  $this->setTemplateFile('widget_generate_code');
53  return $oView->dispWidgetGenerateCode();
54  }
55 
60  {
61  $module_srl = Context::get('module_srl');
62  if(!$module_srl) return $this->stop("msg_invalid_request");
63 
64  $document_srl = Context::get('document_srl');
65  $oDocumentModel = getModel('document');
66  $oDocument = $oDocumentModel->getDocument($document_srl);
67  Context::set('oDocument', $oDocument);
68 
69  $oModuleModel = getModel('module');
70  $columnList = array('module_srl', 'mid');
71  $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
72  Context::set('module_info', $module_info);
73  // Editors settings of the module by calling getEditor
74  $oEditorModel = getModel('editor');
75  $editor = $oEditorModel->getModuleEditor('document',$module_srl, $module_srl,'module_srl','content');
76  Context::set('editor', $editor);
77 
78  $security = new Security();
79  $security->encodeHTML('member_config..');
80 
81  $this->setLayoutPath('./common/tpl');
82  $this->setLayoutFile("default_layout");
83  $this->setTemplateFile('add_content_widget');
84  }
85 }
86 /* End of file widget.admin.view.php */
87 /* Location: ./modules/widget/widget.admin.view.php */
init()
Initialization.
setTemplateFile($filename)
$oModuleModel
Definition: ko.install.php:236
setLayoutFile($filename)
set($key, $val, $set_to_get_vars=0)
widget module&#39;s high class
Definition: widget.class.php:8
$module_srl
integer value to represent a run-time instance of Module (XE Module)
getView($module_name)
Definition: func.inc.php:112
$module_info
an object containing the module information
$document_srl
Definition: ko.install.php:279
$oDocumentModel
Definition: ko.install.php:259
dispWidgetAdminDownloadedList()
Showing a list of widgets.
getModel($module_name)
Definition: func.inc.php:145
admin view class for widget modules
dispWidgetAdminAddContent()
For information on direct entry widget popup kkuhim.