XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
integration_search.admin.view.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
9 {
15  var $config = null;
16 
22  function init()
23  {
24  // Get configurations (using module model object)
25  $oModuleModel = getModel('module');
26  $this->config = $oModuleModel->getModuleConfig('integration_search');
27  Context::set('config',$this->config);
28 
29  $this->setTemplatePath($this->module_path."/tpl/");
30  }
31 
38  {
39  // Get a list of skins(themes)
40  $oModuleModel = getModel('module');
41  $skin_list = $oModuleModel->getSkins($this->module_path);
42  Context::set('skin_list',$skin_list);
43  // Get a list of module categories
44  $module_categories = $oModuleModel->getModuleCategories();
45  // Generated mid Wanted list
46  $obj = new stdClass();
47  $obj->site_srl = 0;
48 
49  // Shown below as obsolete comments - modify by cherryfilter
50  /*$mid_list = $oModuleModel->getMidList($obj);
51  // module_category and module combination
52  if($module_categories) {
53  foreach($mid_list as $module_srl => $module) {
54  $module_categories[$module->module_category_srl]->list[$module_srl] = $module;
55  }
56  } else {
57  $module_categories[0]->list = $mid_list;
58  }
59 
60  Context::set('mid_list',$module_categories);*/
61 
62  $security = new Security();
63  $security->encodeHTML('skin_list..title');
64 
65  // Sample Code
66  Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword" value="{$is_keyword}" /><input class="btn" type="submit" value="{$lang->cmd_search}" /></form>', ENT_COMPAT | ENT_HTML401, 'UTF-8', false) );
67 
68  $this->setTemplateFile("index");
69  }
70 
77  {
78  $oModuleModel = getModel('module');
79  $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $this->config->skin);
80  $skin_vars = unserialize($this->config->skin_vars);
81  // value for skin_info extra_vars
82  if(count($skin_info->extra_vars))
83  {
84  foreach($skin_info->extra_vars as $key => $val)
85  {
86  $name = $val->name;
87  $type = $val->type;
88  $value = $skin_vars->{$name};
89  if($type=="checkbox"&&!$value) $value = array();
90  $skin_info->extra_vars[$key]->value= $value;
91  }
92  }
93  Context::set('skin_info', $skin_info);
94  Context::set('skin_vars', $skin_vars);
95 
96  $config = $oModuleModel->getModuleConfig('integration_search');
97  Context::set('module_info', unserialize($config->skin_vars));
98 
99  $security = new Security();
100  $security->encodeHTML('skin_info...');
101 
102  $this->setTemplateFile("skin_info");
103  }
104 }
105 /* End of file integration_search.admin.view.php */
106 /* Location: ./modules/integration_search/integration_search.admin.view.php */
setTemplateFile($filename)
$oModuleModel
Definition: ko.install.php:236
$obj
Definition: ko.install.php:262
set($key, $val, $set_to_get_vars=0)
getModel($module_name)
Definition: func.inc.php:145