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


PHP CDataColumn::renderFilterCellContent方法代码示例

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


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

示例1: renderFilterCellContent

 /**
  * Renders the filter cell content. Here we can provide HTML options for actual filter input
  */
 protected function renderFilterCellContent()
 {
     if (is_string($this->filter)) {
         echo $this->filter;
     } else {
         if ($this->filter !== false && $this->grid->filter !== null && $this->name !== null && strpos($this->name, '.') === false) {
             if ($this->filterInputOptions) {
                 $filterInputOptions = $this->filterInputOptions;
                 if (empty($filterInputOptions['id'])) {
                     $filterInputOptions['id'] = false;
                 }
             } else {
                 $filterInputOptions = array();
             }
             if (is_array($this->filter)) {
                 $filterInputOptions['prompt'] = '';
                 echo CHtml::activeDropDownList($this->grid->filter, $this->name, $this->filter, $filterInputOptions);
             } else {
                 if ($this->filter === null) {
                     echo CHtml::activeTextField($this->grid->filter, $this->name, $filterInputOptions);
                 }
             }
         } else {
             parent::renderFilterCellContent();
         }
     }
 }
开发者ID:jackycgq,项目名称:advanced,代码行数:30,代码来源:TbDataColumn.php

示例2: renderFilterCellContent

 protected function renderFilterCellContent()
 {
     if (is_string($this->filter)) {
         echo $this->filter;
     } elseif ($this->filter !== false && $this->grid->filter !== null && $this->name !== null && strpos($this->name, '.') === false) {
         if (is_array($this->filter)) {
             echo CHtml::activeDropDownList($this->grid->filter, $this->name, $this->filter, array('id' => false, 'prompt' => ''));
         } elseif ($this->filter === null) {
             echo CHtml::activeTextField($this->grid->filter, $this->name, array('id' => false, 'accesskey' => $this->accesskey));
         }
         // 'placeholder' => '[Alt]+['.$this->accesskey.']'));
     } else {
         parent::renderFilterCellContent();
     }
 }
开发者ID:nurulimamnotes,项目名称:ahadmon,代码行数:15,代码来源:BDataColumn.php

示例3: renderFilterCellContent

 public function renderFilterCellContent()
 {
     if ($this->filter !== false && $this->grid->filter !== null && $this->name !== null && is_int(strpos($this->name, '.'))) {
         if (isset($this->filter['type'])) {
             $type = $this->filter['type'];
             unset($this->filter['type']);
             $attributes = $this->filter;
             //                              $attributes['model']=$this->getParent()->getModel();
             //                              $attributes['attribute']=$this->name;
             ob_start();
             $this->grid->owner->widget($type, $attributes);
             echo ob_get_clean();
         }
         //                      else
         //                              echo $this->filter;
     } else {
         parent::renderFilterCellContent();
     }
 }
开发者ID:Aplay,项目名称:anetika_site,代码行数:19,代码来源:EDataColumnExt.php

示例4: renderFilterCellContent

 /**
  * Renders the filter cell content.
  * This method will render the {@link filter} as is if it is a string.
  * If {@link filter} is an array, it is assumed to be a list of options, and a dropdown selector will be rendered.
  * Otherwise if {@link filter} is not false, a text field is rendered.
  * @since 1.1.1
  * This method is Copyright (c) 2008-2014 by Yii Software LLC
  * http://www.yiiframework.com/license/ 
  */
 protected function renderFilterCellContent()
 {
     if (is_string($this->filter)) {
         echo $this->filter;
     } elseif ($this->filter !== false && $this->grid->filter !== null && $this->name !== null && strpos($this->name, '.') === false) {
         /* x2modstart */
         if (isset($this->filterType)) {
             echo $this->renderFilterCellByType();
             /* x2modend */
         } elseif (is_array($this->filter)) {
             /* x2modstart */
             // removed prompt
             echo CHtml::activeDropDownList($this->grid->filter, $this->name, $this->filter, array('id' => false));
             /* x2modend */
         } elseif ($this->filter === null) {
             echo CHtml::activeTextField($this->grid->filter, $this->name, array('id' => false));
         }
     } else {
         parent::renderFilterCellContent();
     }
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:30,代码来源:X2DataColumnGeneric.php

示例5: renderFilterCellContent

 /**
  * Renders the filter cell content.
  * This method will render the {@link filter} as is if it is a string.
  * If {@link filter} is an array, it is assumed to be a list of options, and a dropdown selector will be rendered.
  * Otherwise if {@link filter} is not false, a text field is rendered.
  * @since 1.1.1
  */
 protected function renderFilterCellContent()
 {
     if (is_string($this->filter)) {
         echo $this->filter;
     } else {
         if ($this->filter !== false && $this->grid->filter !== null && $this->name !== null && strpos($this->name, '.') === false) {
             if (is_array($this->filter)) {
                 echo CHtml::activeDropDownList($this->grid->filter, $this->name, $this->filter, array('id' => false, 'prompt' => ''));
             } else {
                 if ($this->filter === null) {
                     echo CHtml::activeTextField($this->grid->filter, $this->name, array('id' => false));
                 }
             }
         } else {
             if ($this->filter !== false && $this->grid->filter !== null && $this->name !== null && strstr($this->name, '.') != false) {
                 $relation = explode('.', $this->name);
                 echo $this->grid->widget('Relation', array('model' => $this->grid->filter, 'relation' => $relation[0], 'fields' => $relation[1], 'hideAddButton' => true), true);
             } else {
                 parent::renderFilterCellContent();
             }
         }
     }
 }
开发者ID:snapfrozen,项目名称:boxomatic,代码行数:30,代码来源:CEditableColumn.php

示例6: renderFilterCellContent

 public function renderFilterCellContent()
 {
     switch ($this->fieldType) {
         case 'boolean':
             echo CHtml::activeDropdownList($this->grid->filter, $this->name, array('' => '- ' . Yii::t('app', 'Select') . ' -', '1' => Yii::t('app', 'Yes'), 'false' => Yii::t('app', "No")), array('class' => 'x2-minimal-select-filtercol'));
             break;
         case 'dropdown':
             $dropdown = Dropdowns::model()->findByPk($this->fieldModel['linkType']);
             if ($dropdown instanceof Dropdowns) {
                 $options = json_decode($dropdown->options, 1);
                 if (!$dropdown->multi) {
                     $defaultOption = array('' => '- ' . Yii::t('app', 'Select') . ' -');
                     $options = is_array($options) ? array_merge($defaultOption, $options) : $defaultOption;
                 }
                 //$selected = isset($options[$this->grid->filter->{$this->name}]) ?
                 //$this->grid->filter->{$this->name} : '';
                 echo CHtml::activeDropdownList($this->grid->filter, $this->name, $options, array('class' => 'x2-minimal-select-filtercol' . ($dropdown->multi ? ' x2-multiselect-dropdown x2-datacolumn-multiselect' : ''), 'multiple' => $dropdown->multi ? 'multiple' : '', 'data-selected-text' => $dropdown->multi ? 'option(s)' : ''));
             } else {
                 parent::renderFilterCellContent();
             }
             break;
         case 'visibility':
             echo CHtml::activeDropDownList($this->grid->filter, $this->name, array('' => '- ' . Yii::t('app', 'Select') . ' -', 1 => Yii::t('app', 'Public'), 0 => Yii::t('app', 'Private'), 2 => Yii::t('app', 'User\'s Groups')), array('class' => 'x2-minimal-select-filtercol'));
             break;
         case 'dateTime':
         case 'date':
             Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
             $that = $this;
             $renderWidget = function () use($that) {
                 echo Yii::app()->controller->widget('CJuiDateTimePicker', array('model' => $that->grid->filter, 'attribute' => $that->name, 'mode' => 'date', 'options' => array('dateFormat' => Formatter::formatDatePicker('medium')), 'htmlOptions' => array('id' => 'datePicker' . $that->name, 'class' => 'datePicker x2-gridview-filter-datepicker'), 'language' => Yii::app()->language == 'en' ? '' : Yii::app()->getLanguage()), true);
             };
             if ($this->grid->ajax) {
                 X2Widget::ajaxRender($renderWidget);
             } else {
                 $renderWidget();
             }
             break;
         default:
             parent::renderFilterCellContent();
     }
 }
开发者ID:keyeMyria,项目名称:CRM,代码行数:41,代码来源:X2DataColumn.php


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