本文整理匯總了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();
}