本文整理匯總了PHP中ZurmoHtml::value方法的典型用法代碼示例。如果您正苦於以下問題:PHP ZurmoHtml::value方法的具體用法?PHP ZurmoHtml::value怎麽用?PHP ZurmoHtml::value使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ZurmoHtml
的用法示例。
在下文中一共展示了ZurmoHtml::value方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: renderDataCellContent
protected function renderDataCellContent($row, $data)
{
$checked = ZurmoHtml::value($data, $this->name);
$iconClass = $checked ? $this->checkedIcon : $this->uncheckedIcon;
$icon = ZurmoHtml::tag('span', array('class' => 'toggle-column'), ZurmoHtml::tag('i', array('class' => $iconClass), ''));
if (isset($this->visible) && !$this->evaluateExpression($this->visible, array('row' => $row, 'data' => $data))) {
echo $icon;
} else {
echo ZurmoHtml::link($icon, $this->getUrl($data), $this->getHtmlOptions());
}
}
示例2: renderDataCellContent
/**
* Override to add in offset information
* (non-PHPdoc)
* @see CDataColumn::renderDataCellContent()
*/
protected function renderDataCellContent($row, $data)
{
if ($this->value !== null) {
$pagination = $this->grid->dataProvider->getPagination();
if (isset($pagination)) {
$offset = $pagination->getOffset();
} else {
$offset = 0;
}
$value = $this->evaluateExpression($this->value, array('data' => $data, 'row' => $row, 'offset' => $offset + $row));
} elseif ($this->name !== null) {
$value = ZurmoHtml::value($data, $this->name);
}
if ($value === null) {
echo $this->grid->nullDisplay;
} else {
echo $this->grid->getFormatter()->format($value, $this->type);
}
}
示例3: renderDataCellContent
/**
* Override to support adding the label wrapper on the checkbox
* (non-PHPdoc)
* @see CCheckBoxColumn::renderDataCellContent()
*/
protected function renderDataCellContent($row, $data)
{
if ($this->value !== null) {
$value = $this->evaluateExpression($this->value, array('data' => $data, 'row' => $row));
} elseif ($this->name !== null) {
$value = ZurmoHtml::value($data, $this->name);
} else {
$value = $this->grid->dataProvider->keys[$row];
}
$checked = false;
if ($this->checked !== null) {
$checked = $this->evaluateExpression($this->checked, array('data' => $data, 'row' => $row));
}
$options = $this->checkBoxHtmlOptions;
$name = $options['name'];
unset($options['name']);
$options['value'] = $value;
$options['id'] = $this->id . '_' . $row;
echo ZurmoHtml::checkBox($name, $checked, $options);
}