本文整理汇总了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);
}