本文整理汇总了PHP中ViewList::prepareSearchForm方法的典型用法代码示例。如果您正苦于以下问题:PHP ViewList::prepareSearchForm方法的具体用法?PHP ViewList::prepareSearchForm怎么用?PHP ViewList::prepareSearchForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ViewList
的用法示例。
在下文中一共展示了ViewList::prepareSearchForm方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prepareSearchForm
/**
* Overridden from ViewList prepareSearchForm so we can tack on some additional where clauses
*
*/
function prepareSearchForm()
{
parent::prepareSearchForm();
require_once 'modules/Employees/EmployeesSearchForm.php';
$newForm = new EmployeesSearchForm($this->searchForm);
$this->searchForm = $newForm;
}
示例2: testOverrideSearchFields
function testOverrideSearchFields()
{
$list = new ViewList();
$list->module = "Contacts";
$list->seed = new Contact();
$list->prepareSearchForm();
$this->assertTrue(isset($list->searchForm->searchFields['test']));
}
示例3: testdisplay
public function testdisplay()
{
$view = new ViewList();
//test without setting bean attibute. it shuold return no access html.
ob_start();
$view->display();
$renderedContent1 = ob_get_contents();
ob_end_clean();
$this->assertGreaterThan(0, strlen($renderedContent1));
//test with bean, seed and other arrtibutes set. it shuold return html.
$view->bean = new User();
$view->seed = new User();
$view->module = 'Users';
$view->prepareSearchForm();
$view->preDisplay();
ob_start();
$view->display();
$renderedContent2 = ob_get_contents();
ob_end_clean();
$this->assertGreaterThan(0, strlen($renderedContent2));
}