本文整理汇总了PHP中ViewList::listViewPrepare方法的典型用法代码示例。如果您正苦于以下问题:PHP ViewList::listViewPrepare方法的具体用法?PHP ViewList::listViewPrepare怎么用?PHP ViewList::listViewPrepare使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewList
的用法示例。
在下文中一共展示了ViewList::listViewPrepare方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testlistViewPrepare
public function testlistViewPrepare()
{
error_reporting(E_ERROR | E_PARSE);
//test without setting parameters. it should return some html
$view = new ViewList();
$view->module = 'Users';
ob_start();
$view->listViewPrepare();
$renderedContent = ob_get_contents();
ob_end_clean();
$this->assertGreaterThan(0, strlen($renderedContent));
//test with some REQUEST parameters preset. it should return some html and set the REQUEST key we provided in current_query_by_page REQUEST Param.
$view = new ViewList();
$view->module = 'Users';
$GLOBALS['module'] = 'Users';
$_REQUEST['Users2_USER_offset'] = 1;
$_REQUEST['current_query_by_page'] = htmlentities(json_encode(array('key' => 'value')));
$view->bean = new User();
ob_start();
$view->listViewPrepare();
$renderedContent = ob_get_contents();
ob_end_clean();
$this->assertGreaterThan(0, strlen($renderedContent));
$this->assertEquals('value', $_REQUEST['key']);
}
示例2: listViewPrepare
function listViewPrepare()
{
if (empty($_REQUEST['orderBy'])) {
$_REQUEST['orderBy'] = 'date_start';
$_REQUEST['sortOrder'] = 'desc';
}
parent::listViewPrepare();
}
示例3: listViewPrepare
function listViewPrepare()
{
parent::listViewPrepare();
}
示例4: listViewPrepare
function listViewPrepare()
{
$oldRequest = $_REQUEST;
parent::listViewPrepare();
$_REQUEST = $oldRequest;
}
示例5: listViewPrepare
function listViewPrepare()
{
$this->options['show_title'] = false;
parent::listViewPrepare();
echo $this->getModuleTitle(false);
}
示例6: listViewPrepare
function listViewPrepare()
{
parent::listViewPrepare();
global $current_user;
$_SESSION[$current_user->user_name]['displayColumns'] = $this->lv->displayColumns;
}