本文整理汇总了PHP中Grid::formatRow方法的典型用法代码示例。如果您正苦于以下问题:PHP Grid::formatRow方法的具体用法?PHP Grid::formatRow怎么用?PHP Grid::formatRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grid
的用法示例。
在下文中一共展示了Grid::formatRow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: formatRow
function formatRow()
{
parent::formatRow();
$v = $this->add('View', 'v' . $this->current_row['id'], 'content')->set($this->current_row['name']);
$v->js('click', array($this->map->js()->rvadym_gmap()->polygonsArray(null), $this->map->js()->rvadym_gmap()->polygonsCoords(null), $this->map->js()->rvadym_gmap()->drawPolygons($this->current_row['draw'])));
$this->current_row_html['name'] = $v->getHTML();
}
示例2: formatRow
function formatRow()
{
/* -------------------------------------
|
| get additional data from DB
|
*/
// Get data about sender
if ($from_model = $this->config->getTypeModelClassName($this->current_row['from_type'])) {
$from = $this->add($from_model)->tryLoad($this->current_row['from_id']);
} else {
$from['name'] = Model_Message::getFromTypes($this->current_row['from_type']);
}
// get data about receiver
if ($to_model = $this->config->getTypeModelClassName($this->current_row['to_type'])) {
$to = $this->add($to_model)->tryLoad($this->current_row['to_id']);
} else {
$to['name'] = Model_Message::getToTypes($this->current_row['to_type']);
}
/* -------------------------------------
|
| compile HTML
|
*/
$mixed_html = '';
$message_model = $this->config->getMessageModelClassName();
$mixed_html = $mixed_html . '<div class="' . $this->config->get('message-from-class') . '"><strong>From:</strong> ' . $from['name'] . ' (' . $message_model::getFromTypes($this->current_row['from_type']) . ') ' . ($this->current_row['from_is_deleted'] ? '*deleted*' : '') . '</div>';
$mixed_html = $mixed_html . '<div class="' . $this->config->get('message-to-class') . '"><strong>To:</strong> ' . $to['name'] . ' (' . $message_model::getToTypes($this->current_row['to_type']) . ') ' . ($this->current_row['to_is_deleted'] ? '*deleted*' : '') . '</div>';
$mixed_html = $mixed_html . '<div class="' . $this->config->get('message-text-class') . '">' . $this->current_row['text'] . '</div>';
$this->current_row_html['message'] = $mixed_html;
parent::formatRow();
}
示例3: formatRow
function formatRow()
{
parent::formatRow();
if ($this->owner instanceof \CRUD) {
if (!$this->current_row_html['edit']) {
if ($this->row_edit) {
$this->current_row_html['edit'] = '<a class="table-link pb_edit" href="#" data-id="' . $this->model->id . '"><span class="fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-pencil fa-stack-1x fa-inverse"></i></span></a>';
} else {
$this->current_row_html['edit'] = '<span class="fa-stack table-link"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-pencil fa-stack-1x fa-inverse"></i></span>';
}
}
if (!$this->current_row_html['delete']) {
if ($this->row_delete) {
$this->current_row_html['delete'] = '<a class="table-link danger do-delete" href="#" data-id="' . $this->model->id . '"><span class="fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-trash-o fa-stack-1x fa-inverse"></i></span></a>';
} else {
$this->current_row_html['delete'] = '<span class="table-link fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-trash-o fa-stack-1x fa-inverse"></i></span>';
}
}
}
}