本文整理匯總了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));
}