本文整理匯總了PHP中DashletGeneric::processDisplayOptions方法的典型用法代碼示例。如果您正苦於以下問題:PHP DashletGeneric::processDisplayOptions方法的具體用法?PHP DashletGeneric::processDisplayOptions怎麽用?PHP DashletGeneric::processDisplayOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DashletGeneric
的用法示例。
在下文中一共展示了DashletGeneric::processDisplayOptions方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testBlankOptionsAreNotFiltered
/**
* Ensure that module labels are built correctly
*/
public function testBlankOptionsAreNotFiltered()
{
global $app_strings;
// name of test field
$field_name = 'bug_48652_field';
// create a bean with minimal needed set of field definitions
$seedBean = new SugarBean();
$seedBean->field_defs = array($field_name => array('name' => null, 'vname' => null, 'type' => 'enum', 'remove_blank' => false, 'options' => $this->options));
// create a dashlet containing bean
require_once 'include/Dashlets/DashletGeneric.php';
$dashlet = new DashletGeneric(null);
$dashlet->seedBean = $seedBean;
$dashlet->columns = array();
$dashlet->searchFields = array($field_name => array());
// generate dashlet setup form
$dashlet->processDisplayOptions();
// ensure that the generated element contains blank option
$search_fields = $dashlet->currentSearchFields;
$this->assertArrayHasKey($field_name, $search_fields);
$this->assertArrayHasKey('input', $search_fields[$field_name]);
$this->assertContains('>' . $app_strings['LBL_NONE'] . '<', $search_fields[$field_name]['input']);
}