本文整理汇总了PHP中Grid::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Grid::render方法的具体用法?PHP Grid::render怎么用?PHP Grid::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grid
的用法示例。
在下文中一共展示了Grid::render方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testDataDefinition
/**
* Test data definition method
*/
function testDataDefinition()
{
$dataset1 = array('object1' => array('name' => 'Bob'), 'object2' => array('name' => 'Ben'));
$dataset2 = array('object3' => array('name' => 'Bud'));
$SUT = new Grid();
$SUT->column()->field('name')->title('Name');
$SUT->data($dataset1);
$grid = $SUT->render();
$this->assertRegExp('/Bob/', $grid);
$this->assertNotRegExp('/Bud/', $grid);
$SUT->data($dataset2);
$grid = $SUT->__tostring();
$this->assertRegExp('/Ben/', $grid);
$this->assertRegExp('/Bud/', $grid);
}
示例2: render
function render()
{
if ($this->api->info_messages) {
return parent::render();
}
}
示例3: __
<h2><?php
echo __(':dir directory', array(':dir' => $folder));
?>
<small>
<?php
echo HTML::anchor(Route::get('admin/resource')->uri(array('action' => 'create', 'path' => $folder->parent . '/' . $folder->name)), 'Create Folder');
?>
<?php
echo HTML::anchor(Route::get('admin/resource')->uri(array('action' => 'upload', 'path' => $folder->parent . '/' . $folder->name)), 'Upload File');
?>
</small>
</h2>
<?php
// Create directory listing
$grid = new Grid();
$grid->column('action')->field('path')->title('File/Folder Name')->text('{name}')->route(Route::get('admin/resource'))->params(array('action' => 'read'))->param('path');
$grid->column()->field('size')->title('Size');
$grid->column()->field('date')->title('Date Modified');
$grid->column('action')->field('path')->title('Actions')->text('Delete')->class('delete')->route(Route::get('admin/resource'))->params(array('action' => 'delete'))->param('path');
$grid->data($folder->folders);
$grid->data($folder->files);
echo $grid->render();
示例4: render
function render()
{
$this->js(true)->_load('footable')->_css('libs/footable.core')->find('table')->footable();
parent::render();
}