當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Grid::render方法代碼示例

本文整理匯總了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);
 }
開發者ID:vimofthevine,項目名稱:grid,代碼行數:18,代碼來源:IntegTest.php

示例2: render

 function render()
 {
     if ($this->api->info_messages) {
         return parent::render();
     }
 }
開發者ID:respond,項目名稱:atk4,代碼行數:6,代碼來源:InfoWindow.php

示例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();
開發者ID:vimofthevine,項目名稱:kohana-cms,代碼行數:24,代碼來源:directory_contents.php

示例4: render

 function render()
 {
     $this->js(true)->_load('footable')->_css('libs/footable.core')->find('table')->footable();
     parent::render();
 }
開發者ID:xepan,項目名稱:base,代碼行數:5,代碼來源:Grid.php


注:本文中的Grid::render方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。