コード例 #1
0
ファイル: form_checkbox.tag.php プロジェクト: snowjobgit/limb
 function preParse($compiler)
 {
     if ($this->_isStandartMode()) {
         $this->widget_include_file = 'limb/macro/src/tags/form/lmbMacroCheckableInputWidget.class.php';
         $this->widget_class_name = 'lmbMacroCheckableInputWidget';
     } else {
         $this->widget_include_file = 'limb/macro/src/tags/form/lmbMacroJSCheckboxWidget.class.php';
         $this->widget_class_name = 'lmbMacroJSCheckboxWidget';
     }
     parent::preParse($compiler);
     $this->set('type', 'checkbox');
 }
コード例 #2
0
ファイル: select.tag.php プロジェクト: knevcher/limb
 function preParse($compiler)
 {
     if ($this->getBool('multiple')) {
         $this->widget_include_file = 'limb/macro/src/tags/form/lmbMacroMultipleSelectWidget.class.php';
         $this->widget_class_name = 'lmbMacroMultipleSelectWidget';
         if (!$this->has('name')) {
             if ($this->has('id')) {
                 $this->set('name', $this->get('id') . '[]');
             } else {
                 $this->raiseRequiredAttribute('name');
             }
         }
         if (!is_integer(strpos($this->get('name'), '[]'))) {
             $this->raise('Array brackets "[]" required in name attribute, e.g. name="foo[]"', array('name' => $this->get('name')));
         }
     } elseif (!isset($this->widget_include_file)) {
         $this->widget_include_file = 'limb/macro/src/tags/form/lmbMacroSingleSelectWidget.class.php';
         $this->widget_class_name = 'lmbMacroSingleSelectWidget';
     }
     // always has closing tag
     $this->has_closing_tag = true;
     parent::preParse($compiler);
 }
コード例 #3
0
ファイル: form_text.tag.php プロジェクト: snowjobgit/limb
 function preParse($compiler)
 {
     parent::preParse($compiler);
     $this->set('type', 'text');
 }
コード例 #4
0
ファイル: textarea.tag.php プロジェクト: snowjobgit/limb
 function preParse($compiler)
 {
     parent::preParse($compiler);
     // always has closing tag
     $this->has_closing_tag = true;
 }
コード例 #5
0
ファイル: form_password.tag.php プロジェクト: snowjobgit/limb
 function preParse($compiler)
 {
     parent::preParse($compiler);
     $this->set('type', 'password');
 }
コード例 #6
0
ファイル: js_checkbox.tag.php プロジェクト: snowjobgit/limb
 function preParse($compiler)
 {
     parent::preParse($compiler);
     $this->set('type', 'checkbox');
 }
コード例 #7
0
ファイル: datetime.tag.php プロジェクト: snowjobgit/limb
 protected function _generateAfterClosingTag($code)
 {
     parent::_generateAfterClosingTag($code);
     $widget = $this->getRuntimeVar();
     $code->writePHP("{$widget}->renderCalendar();\n");
 }