当前位置: 首页>>代码示例>>PHP>>正文


PHP Grid::column方法代码示例

本文整理汇总了PHP中Grid::column方法的典型用法代码示例。如果您正苦于以下问题:PHP Grid::column方法的具体用法?PHP Grid::column怎么用?PHP Grid::column使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Grid的用法示例。


在下文中一共展示了Grid::column方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
 }
开发者ID:vimofthevine,项目名称:grid,代码行数:18,代码来源:IntegTest.php

示例2: __

<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();
开发者ID:vimofthevine,项目名称:kohana-cms,代码行数:24,代码来源:directory_contents.php

示例3: __

<h2><?php 
echo __('":title" History', array(':title' => $page->title));
?>
	<small><?php 
echo HTML::anchor(Request::$current->uri(array('action' => 'list')), 'back');
?>
</small>
</h2>
<?php 
echo form::open();
echo '<p class="submit">';
echo Form::submit('submit', __('View Diff'));
echo '</p>';
// Create revision list
$grid = new Grid();
$grid->column('radio')->field('version')->title('Version 1')->name('ver1');
$grid->column('radio')->field('version')->title('Version 2')->name('ver2');
$grid->column()->field('version')->title('Revision');
$grid->column()->field('editor')->title('Editor');
$grid->column('date')->field('date')->title('Date');
$grid->column()->field('comments')->title('Comments');
$grid->data($revisions);
echo $grid;
echo form::close();
开发者ID:vimofthevine,项目名称:kohana-cms,代码行数:24,代码来源:history.php

示例4: __

<h2><?php 
echo __('Users List');
?>
</h2>

<?php 
if (count($users) == 0) {
    ?>
<p>
	There are no users at this time
	(<?php 
    echo HTML::anchor(Route::$current->uri(array('action' => 'new')), 'create one');
    ?>
).
</p>
<?php 
} else {
    // Create user list
    $grid = new Grid();
    $grid->column()->field('id')->title('ID');
    $grid->column('action')->title('Username')->text('{username}')->route(Route::get('admin'))->params(array('controller' => 'users', 'action' => 'view'));
    $grid->column()->field('role')->title('Role');
    $grid->column()->field('email')->title('Email');
    $grid->column('action')->title('Actions')->text('Edit')->class('edit')->route(Route::get('admin'))->params(array('controller' => 'users', 'action' => 'edit'));
    $grid->column('action')->title('')->text('Delete')->class('delete')->route(Route::get('admin'))->params(array('controller' => 'users', 'action' => 'delete'));
    $grid->data($users);
    echo $grid;
}
开发者ID:vimofthevine,项目名称:kohana-admin,代码行数:28,代码来源:list.php

示例5: __

<h2><?php 
echo __('Tag List');
?>
</h2>

<?php 
if (count($tags) == 0) {
    ?>
<p>
	There are no tags at this time
	(<?php 
    echo HTML::anchor($request->uri(array('action' => 'new')), 'create one');
    ?>
).
</p>
<?php 
} else {
    // Create tag list
    $grid = new Grid();
    $grid->column()->field('id')->title('ID');
    $grid->column()->field('name')->title('Name');
    $grid->column('action')->title('Actions')->text('Edit')->class('edit')->route($request)->params(array('action' => 'edit'));
    $grid->column('action')->title('')->text('Delete')->class('delete')->route($request)->params(array('action' => 'delete'));
    $grid->data($tags);
    echo $grid->render();
}
开发者ID:vimofthevine,项目名称:kohana-blog,代码行数:26,代码来源:tag_list.php

示例6: Grid

<h2><?php 
echo $legend;
?>
</h2>
<?php 
if (count($articles) == 0) {
    ?>
<p>
	There are no posts as this time
	(<?php 
    echo HTML::anchor(Route::$current->uri(array('action' => 'new')), 'create one');
    ?>
).
</p>
<?php 
} else {
    // Create article list
    $grid = new Grid();
    $grid->column()->field('id')->title('ID');
    $grid->column()->field('title')->title('Title');
    $grid->column()->field('state')->title('State');
    $grid->column('action')->title('Actions')->text('Edit')->class('edit')->route($request)->params(array('action' => 'edit'));
    $grid->column('action')->title('')->text('History')->class('history')->route($request)->params(array('action' => 'history'));
    $grid->data($articles);
    echo $pagination;
    echo $grid->render();
    echo $pagination;
}
开发者ID:vimofthevine,项目名称:kohana-blog,代码行数:28,代码来源:article_list.php

示例7: __

<h2><?php 
echo __('Page List');
?>
</h2>

<?php 
if (count($pages) == 0) {
    ?>
<p>
	There are no pages at this time
	(<?php 
    echo HTML::anchor(Route::$current->uri(array('action' => 'new')), 'create one');
    ?>
).
</p>
<?php 
} else {
    // Create page list
    $grid = new Grid();
    $grid->column()->field('id')->title('ID');
    $grid->column()->field('title')->title('Title');
    $grid->column()->field('version')->title('Ver');
    $grid->column('action')->title('Actions')->text('Edit')->class('edit')->route(Route::get('admin/cms'))->params(array('action' => 'edit'));
    $grid->column('action')->title('')->text('History')->class('history')->route(Route::get('admin/cms'))->params(array('action' => 'history'));
    $grid->data($pages);
    echo $grid;
}
开发者ID:vimofthevine,项目名称:kohana-cms,代码行数:27,代码来源:list.php


注:本文中的Grid::column方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。