当前位置: 首页>>代码示例>>PHP>>正文


PHP Zikula_Form_View::getPostBackEventReference方法代码示例

本文整理汇总了PHP中Zikula_Form_View::getPostBackEventReference方法的典型用法代码示例。如果您正苦于以下问题:PHP Zikula_Form_View::getPostBackEventReference方法的具体用法?PHP Zikula_Form_View::getPostBackEventReference怎么用?PHP Zikula_Form_View::getPostBackEventReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zikula_Form_View的用法示例。


在下文中一共展示了Zikula_Form_View::getPostBackEventReference方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 /**
  * Render event handler.
  *
  * @param Zikula_Form_View $view Reference to Zikula_Form_View object.
  *
  * @return string The rendered output
  */
 public function render(Zikula_Form_View $view)
 {
     $html = '';
     $html .= "<script type=\"text/javascript\">\n<!--\n{$this->function} = function() { ";
     $html .= $view->getPostBackEventReference($this, $this->commandName);
     $html .= " }\n// -->\n</script>";
     return $html;
 }
开发者ID:projectesIF,项目名称:Sirius,代码行数:15,代码来源:PostbackFunction.php

示例2: render

 /**
  * Render event handler.
  *
  * @param Zikula_Form_View $view Reference to Zikula_Form_View object.
  *
  * @return string The rendered output
  */
 function render(Zikula_Form_View $view)
 {
     $idHtml = $this->getIdHtml();
     $nameHtml = " name=\"{$this->inputName}[]\"";
     $readOnlyHtml = $this->readOnly ? " disabled=\"disabled\"" : '';
     $class = 'z-form-dropdownlist';
     if (!$this->isValid) {
         $class .= ' z-form-error';
     }
     if ($this->mandatorysym) {
         $class .= ' z-form-mandatory';
     }
     if ($this->readOnly) {
         $class .= ' z-form-readonly';
     }
     if ($this->cssClass != null) {
         $class .= ' ' . $this->cssClass;
     }
     $classHtml = $class == '' ? '' : " class=\"{$class}\"";
     $sizeHtml = $this->size == null ? '' : " size=\"{$this->size}\"";
     $postbackHtml = '';
     if ($this->autoPostBack) {
         $postbackHtml = " onchange=\"" . $view->getPostBackEventReference($this, '') . "\"";
     }
     $multipleHtml = '';
     if ($this->selectionMode == 'multiple') {
         $multipleHtml = " multiple=\"multiple\"";
     }
     $attributes = $this->renderAttributes($view);
     $result = "<select{$idHtml}{$nameHtml}{$readOnlyHtml}{$classHtml}{$postbackHtml}{$multipleHtml}{$sizeHtml}{$attributes}>\n";
     $currentOptGroup = null;
     foreach ($this->items as $item) {
         $optgroup = isset($item['optgroup']) ? $item['optgroup'] : null;
         if ($optgroup != $currentOptGroup) {
             if ($currentOptGroup != null) {
                 $result .= "</optgroup>\n";
             }
             if ($optgroup != null) {
                 $result .= "<optgroup label=\"" . DataUtil::formatForDisplay($optgroup) . "\">\n";
             }
             $currentOptGroup = $optgroup;
         }
         $text = DataUtil::formatForDisplay($item['text']);
         if ($item['value'] === null) {
             $value = '#null#';
         } else {
             $value = DataUtil::formatForDisplay($item['value']);
         }
         if ($this->selectionMode == 'single' && $value == $this->selectedValue) {
             $selected = ' selected="selected"';
         } else {
             if ($this->selectionMode == 'multiple' && in_array($value, (array) $this->selectedValue)) {
                 $selected = ' selected="selected"';
             } else {
                 $selected = '';
             }
         }
         $result .= "<option value=\"{$value}\"{$selected}>{$text}</option>\n";
     }
     if ($currentOptGroup != null) {
         $result .= "</optgroup>\n";
     }
     $result .= "</select>\n";
     if ($this->mandatorysym) {
         $result .= '<span class="z-form-mandatory-flag">*</span>';
     }
     return $result;
 }
开发者ID:planetenkiller,项目名称:core,代码行数:75,代码来源:DropdownList.php

示例3: render

 /**
  * Render event handler.
  *
  * @param Zikula_Form_View $view Reference to Zikula_Form_View object.
  *
  * @return string The rendered output
  */
 function render(Zikula_Form_View $view)
 {
     $idHtml = $this->getIdHtml();
     $nameHtml = " name=\"{$this->groupName}\"";
     $readOnlyHtml = $this->readOnly ? " disabled=\"disabled\"" : '';
     $checkedHtml = $this->checked ? " checked=\"checked\"" : '';
     $postbackHtml = '';
     if ($this->autoPostBack) {
         $postbackHtml = " onclick=\"" . $view->getPostBackEventReference($this, '') . "\"";
     }
     $class = 'z-form-radio';
     if ($this->mandatory && $this->mandatorysym) {
         $class .= ' z-form-mandatory';
     }
     if ($this->readOnly) {
         $class .= ' z-form-readonly';
     }
     if ($this->cssClass != null) {
         $class .= ' ' . $this->cssClass;
     }
     $attributes = $this->renderAttributes($view);
     $result = "<input{$idHtml}{$nameHtml} type=\"radio\" value=\"{$this->value}\"{$readOnlyHtml}{$checkedHtml}{$postbackHtml}{$attributes} class=\"{$class}\" />";
     if ($this->mandatory && $this->mandatorysym) {
         $result .= '<span class="z-form-mandatory-flag">*</span>';
     }
     return $result;
 }
开发者ID:planetenkiller,项目名称:core,代码行数:34,代码来源:RadioButton.php


注:本文中的Zikula_Form_View::getPostBackEventReference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。