本文整理汇总了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']);
}