本文整理汇总了PHP中DashletGeneric::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP DashletGeneric::__construct方法的具体用法?PHP DashletGeneric::__construct怎么用?PHP DashletGeneric::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DashletGeneric
的用法示例。
在下文中一共展示了DashletGeneric::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings;
require 'modules/Meetings/Dashlets/MyMeetingsDashlet/MyMeetingsDashlet.data.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_LIST_MY_MEETINGS', 'Meetings');
}
$this->searchFields = $dashletData['MyMeetingsDashlet']['searchFields'];
if (empty($def['filters'])) {
if (isset($this->searchFields['status'])) {
if (!empty($this->searchFields['status']['default'])) {
$this->filters['status'] = $this->searchFields['status']['default'];
}
}
}
$this->columns = $dashletData['MyMeetingsDashlet']['columns'];
/*$this->columns['set_accept_links']= array('width' => '10',
'label' => translate('LBL_ACCEPT_THIS', 'Meetings'),
'sortable' => false,
'default' => true,
'related_fields' => array('status'));*/
$this->hasScript = true;
// dashlet has javascript attached to it
$this->seedBean = new Meeting();
}
示例2: translate
function __construct($id, $def = null)
{
require 'modules/jjwg_Maps/metadata/dashletviewdefs.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_HOMEPAGE_TITLE', 'jjwg_Maps');
}
$this->searchFields = $dashletData['jjwg_MapsDashlet']['searchFields'];
$this->columns = $dashletData['jjwg_MapsDashlet']['columns'];
$this->seedBean = new jjwg_Maps();
}
示例3: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings;
require 'modules/My_Custom_Issue/metadata/dashletviewdefs.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_HOMEPAGE_TITLE', 'My_Custom_Issue');
}
$this->searchFields = $dashletData['My_Custom_IssueDashlet']['searchFields'];
$this->columns = $dashletData['My_Custom_IssueDashlet']['columns'];
$this->seedBean = new My_Custom_Issue();
}
示例4: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings;
require 'modules/Tasks/Dashlets/MyTasksDashlet/MyTasksDashlet.data.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_LIST_MY_TASKS', 'Tasks');
}
$this->searchFields = $dashletData['MyTasksDashlet']['searchFields'];
$this->columns = $dashletData['MyTasksDashlet']['columns'];
$this->seedBean = new Task();
}
示例5: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings;
require 'modules/AOK_Knowledge_Base_Categories/metadata/dashletviewdefs.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_HOMEPAGE_TITLE', 'AOK_Knowledge_Base_Categories');
}
$this->searchFields = $dashletData['AOK_Knowledge_Base_CategoriesDashlet']['searchFields'];
$this->columns = $dashletData['AOK_Knowledge_Base_CategoriesDashlet']['columns'];
$this->seedBean = new AOK_Knowledge_Base_Categories();
}
示例6: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings, $dashletData;
require 'modules/Notes/Dashlets/MyNotesDashlet/MyNotesDashlet.data.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_MY_NOTES_DASHLETNAME', 'Notes');
}
$this->searchFields = $dashletData['MyNotesDashlet']['searchFields'];
$this->columns = $dashletData['MyNotesDashlet']['columns'];
$this->seedBean = new Note();
}
示例7: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings;
require 'modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.data.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_HOMEPAGE_TITLE', 'Accounts');
}
$this->searchFields = $dashletData['MyAccountsDashlet']['searchFields'];
$this->columns = $dashletData['MyAccountsDashlet']['columns'];
$this->seedBean = new Account();
}
示例8: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings;
require 'modules/glam_Glam_Envio_Informacion/metadata/dashletviewdefs.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_HOMEPAGE_TITLE', 'glam_Glam_Envio_Informacion');
}
$this->searchFields = $dashletData['glam_Glam_Envio_InformacionDashlet']['searchFields'];
$this->columns = $dashletData['glam_Glam_Envio_InformacionDashlet']['columns'];
$this->seedBean = new glam_Glam_Envio_Informacion();
}
示例9: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings;
require 'modules/OutboundEmailAccounts/metadata/dashletviewdefs.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_HOMEPAGE_TITLE', 'OutboundEmailAccounts');
}
$this->searchFields = $dashletData['OutboundEmailAccountsDashlet']['searchFields'];
$this->columns = $dashletData['OutboundEmailAccountsDashlet']['columns'];
$this->seedBean = new OutboundEmailAccounts();
}
示例10: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings, $dashletData;
require 'modules/Opportunities/Dashlets/MyOpportunitiesDashlet/MyOpportunitiesDashlet.data.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_TOP_OPPORTUNITIES', 'Opportunities');
}
$this->searchFields = $dashletData['MyOpportunitiesDashlet']['searchFields'];
$this->columns = $dashletData['MyOpportunitiesDashlet']['columns'];
$this->seedBean = new Opportunity();
}
示例11: translate
function __construct($id, $def = null)
{
global $current_user, $app_strings, $dashletData;
require 'modules/Emails/Dashlets/MyEmailsDashlet/MyEmailsDashlet.data.php';
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_MY_EMAILS', 'Emails');
}
$this->searchFields = $dashletData['MyEmailsDashlet']['searchFields'];
$this->hasScript = true;
// dashlet has javascript attached to it
$this->columns = $dashletData['MyEmailsDashlet']['columns'];
$this->seedBean = new Email();
}
示例12: array
function __construct($id, $def = null)
{
global $current_user, $app_strings, $app_list_strings;
require_once 'modules/SugarFeed/metadata/dashletviewdefs.php';
$this->myItemsOnly = false;
parent::__construct($id, $def);
$this->myItemsOnly = false;
$this->isConfigurable = true;
$this->hasScript = true;
$pattern = array();
$pattern[] = "/-/";
$pattern[] = "/[0-9]/";
$replacements = array();
$replacements[] = '';
$replacements[] = '';
$this->idjs = preg_replace($pattern, $replacements, $this->id);
// Add in some default categories.
$this->categories['ALL'] = translate('LBL_ALL', 'SugarFeed');
// Need to get the rest of the active SugarFeed modules
$module_list = SugarFeed::getActiveFeedModules();
// Translate the category names
if (!is_array($module_list)) {
$module_list = array();
}
foreach ($module_list as $module) {
if ($module == 'UserFeed') {
// Fake module, need to translate specially
$this->categories[$module] = translate('LBL_USER_FEED', 'SugarFeed');
} else {
$this->categories[$module] = $app_list_strings['moduleList'][$module];
}
}
// Need to add the external api's here
$this->externalAPIList = ExternalAPIFactory::getModuleDropDown('SugarFeed', true);
if (!is_array($this->externalAPIList)) {
$this->externalAPIList = array();
}
foreach ($this->externalAPIList as $apiObj => $apiName) {
$this->categories[$apiObj] = $apiName;
}
if (empty($def['title'])) {
$this->title = translate('LBL_HOMEPAGE_TITLE', 'SugarFeed');
}
if (!empty($def['rows'])) {
$this->displayRows = $def['rows'];
}
if (!empty($def['categories'])) {
$this->selectedCategories = $def['categories'];
}
if (!empty($def['userfeed_created'])) {
$this->userfeed_created = $def['userfeed_created'];
}
$this->searchFields = $dashletData['SugarFeedDashlet']['searchFields'];
$this->columns = $dashletData['SugarFeedDashlet']['columns'];
$twitter_enabled = $this->check_enabled('twitter');
$facebook_enabled = $this->check_enabled('facebook');
if ($facebook_enabled) {
$this->categories["Facebook"] = "Facebook";
}
if ($twitter_enabled) {
$this->categories["Twitter"] = "Twitter";
}
$catCount = count($this->categories);
ACLController::filterModuleList($this->categories, false);
if (count($this->categories) < $catCount) {
if (!empty($this->selectedCategories)) {
ACLController::filterModuleList($this->selectedCategories, true);
} else {
$this->selectedCategories = array_keys($this->categories);
unset($this->selectedCategories[0]);
}
}
$this->seedBean = new SugarFeed();
}