XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
poll_maker.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class poll_maker extends EditorHandler
9 {
10  // editor_sequence from the editor must attend mandatory wearing ....
12  var $component_path = '';
13 
18  {
19  $this->editor_sequence = $editor_sequence;
20  $this->component_path = $component_path;
21  }
22 
26  function getPopupContent()
27  {
28  // Wanted Skins survey
29  $oModuleModel = getModel('module');
30  $skin_list = $oModuleModel->getSkins(_XE_PATH_ . 'modules/poll/');
31  Context::set('skin_list', $skin_list);
32  // Pre-compiled source code to compile template return to
33  $tpl_path = $this->component_path.'tpl';
34  $tpl_file = 'popup.html';
35 
36  $oTemplate = &TemplateHandler::getInstance();
37  return $oTemplate->compile($tpl_path, $tpl_file);
38  }
39 
46  function transHTML($xml_obj)
47  {
48  $poll_srl = $xml_obj->attrs->poll_srl;
49  $skin = $xml_obj->attrs->skin;
50  if(!$skin) $skin = 'default';
51 
52  preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
53  $width = $matches[2];
54  if(!$width) $width = 400;
55  $style = sprintf('width:%dpx', $width);
56  // poll model object creation to come get it return html
57  $oPollModel = getModel('poll');
58  return $oPollModel->getPollHtml($poll_srl, $style, $skin);
59  }
60 }
61 /* End of file poll_maker.class.php */
62 /* Location: ./modules/editor/components/poll_maker/poll_maker.class.php */
$oModuleModel
Definition: ko.install.php:236
__construct($editor_sequence, $component_path)
editor_sequence and components out of the path
set($key, $val, $set_to_get_vars=0)
getPopupContent()
popup window to display in popup window request is to add content
transHTML($xml_obj)
Editor of the components separately if you use a unique code to the html code for a method to change...
const _XE_PATH_
Definition: config.inc.php:49
Editor provides the ability to link to the url.
getModel($module_name)
Definition: func.inc.php:145