本文整理汇总了PHP中CGridColumn::renderHeaderCellContent方法的典型用法代码示例。如果您正苦于以下问题:PHP CGridColumn::renderHeaderCellContent方法的具体用法?PHP CGridColumn::renderHeaderCellContent怎么用?PHP CGridColumn::renderHeaderCellContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGridColumn
的用法示例。
在下文中一共展示了CGridColumn::renderHeaderCellContent方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderHeaderCellContent
/**
* Renders the header cell content.
* This method will render a link that can trigger the sorting if the column is sortable.
*/
protected function renderHeaderCellContent()
{
if ($this->grid->enableSorting && $this->sortable && $this->name !== null) {
echo $this->grid->dataProvider->getSort()->link($this->name, $this->header);
} else {
parent::renderHeaderCellContent();
}
}
示例2: renderHeaderCellContent
/**
* Renders the header cell content.
* This method will render a link that can trigger the sorting if the column is sortable.
*/
protected function renderHeaderCellContent()
{
if ($this->grid->enableSorting && $this->sortable && $this->name !== null) {
echo $this->grid->dataProvider->getSort()->link($this->name, $this->header, array('class' => 'sort-link'));
} elseif ($this->name !== null && $this->header === null) {
if ($this->grid->dataProvider instanceof CActiveDataProvider) {
echo CHtml::encode($this->grid->dataProvider->model->getAttributeLabel($this->name));
} else {
echo CHtml::encode($this->name);
}
} else {
parent::renderHeaderCellContent();
}
}
示例3: renderHeaderCellContent
/**
* Renders the header cell content.
* This method will render a checkbox in the header when {@link CGridView::selectableRows} is greater than 1.
*/
protected function renderHeaderCellContent()
{
if ($this->grid->selectableRows > 1) {
echo CHtml::checkBox($this->id . '_all', false);
} else {
parent::renderHeaderCellContent();
}
}
示例4: renderHeaderCellContent
/**
* Render header cell (can not be sortable)
*/
protected function renderHeaderCellContent()
{
if ($this->name !== null && $this->header === null) {
if ($this->grid->dataProvider instanceof CActiveDataProvider) {
echo CHtml::encode($this->grid->dataProvider->model->getAttributeLabel($this->name));
} else {
echo CHtml::encode($this->name);
}
} else {
parent::renderHeaderCellContent();
}
}
示例5: renderHeaderCellContent
/**
* Renders the header cell content.
* This method will render a checkbox in the header when {@link selectableRows} is greater than 1
* or in case {@link selectableRows} is null when {@link CGridView::selectableRows} is greater than 1.
*/
protected function renderHeaderCellContent()
{
if (trim($this->headerTemplate) === '') {
echo $this->grid->blankDisplay;
return;
}
$item = '';
if ($this->selectableRows === null && $this->grid->selectableRows > 1) {
$item = CHtml::checkBox($this->id . '_all', false, array('class' => 'select-on-check-all'));
} elseif ($this->selectableRows > 1) {
$item = CHtml::checkBox($this->id . '_all', false);
} else {
ob_start();
parent::renderHeaderCellContent();
$item = ob_get_clean();
}
echo strtr($this->headerTemplate, array('{item}' => $item));
}
示例6: renderHeaderCellContent
/**
* Renders the header cell content.
* This method will render a checkbox in the header when {@link selectableRows} is greater than 1
* or in case {@link selectableRows} is null when {@link CGridView::selectableRows} is greater than 1.
*/
protected function renderHeaderCellContent()
{
if ($this->selectableRows === null && $this->grid->selectableRows > 1) {
echo CHtml::checkBox($this->id . '_all', false, array('class' => 'select-on-check-all'));
} else {
if ($this->selectableRows > 1) {
echo CHtml::checkBox($this->id . '_all', false);
} else {
parent::renderHeaderCellContent();
}
}
}
示例7: renderHeaderCellContent
protected function renderHeaderCellContent()
{
CGridColumn::renderHeaderCellContent();
}