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
editor
components
poll_maker
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 ....
11
var
$editor_sequence
= 0;
12
var
$component_path
=
''
;
13
17
function
__construct
(
$editor_sequence
,
$component_path
)
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
$oModuleModel
Definition:
ko.install.php:236
poll_maker\__construct
__construct($editor_sequence, $component_path)
editor_sequence and components out of the path
Definition:
poll_maker.class.php:17
TemplateHandler\getInstance
static & getInstance()
Definition:
TemplateHandler.class.php:60
poll_maker\$component_path
$component_path
Definition:
poll_maker.class.php:12
Context\set
set($key, $val, $set_to_get_vars=0)
Definition:
Context.class.php:1948
poll_maker\$editor_sequence
$editor_sequence
Definition:
poll_maker.class.php:11
poll_maker\getPopupContent
getPopupContent()
popup window to display in popup window request is to add content
Definition:
poll_maker.class.php:26
poll_maker\transHTML
transHTML($xml_obj)
Editor of the components separately if you use a unique code to the html code for a method to change...
Definition:
poll_maker.class.php:46
_XE_PATH_
const _XE_PATH_
Definition:
config.inc.php:49
poll_maker
Editor provides the ability to link to the url.
Definition:
poll_maker.class.php:8
getModel
getModel($module_name)
Definition:
func.inc.php:145
EditorHandler
Definition:
EditorHandler.class.php:11
Generated on Tue Dec 18 2018 17:04:28 for XpressEngine Core by
1.8.5