*/
public function buildUserDashBoard() {
//build component selectors
- $dashboardElements = array();
- $config = CRM_Core_Config::singleton();
+ $dashboardElements = [];
- $this->_userOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
+ $dashboardOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
'user_dashboard_options'
);
continue;
}
- if (!empty($this->_userOptions[$name]) &&
+ if (!empty($dashboardOptions[$name]) &&
(CRM_Core_Permission::access($component->name) ||
CRM_Core_Permission::check($elem['perm'][0])
)
}
// CRM-16512 - Hide related contact table if user lacks permission to view self
- if (!empty($this->_userOptions['Permissioned Orgs']) && CRM_Core_Permission::check('view my contact')) {
+ if (!empty($dashboardOptions['Permissioned Orgs']) && CRM_Core_Permission::check('view my contact')) {
$dashboardElements[] = array(
'class' => 'crm-dashboard-permissionedOrgs',
'templatePath' => 'CRM/Contact/Page/View/RelationshipSelector.tpl',
}
- if (!empty($this->_userOptions['PCP'])) {
+ if (!empty($dashboardOptions['PCP'])) {
$dashboardElements[] = array(
'class' => 'crm-dashboard-pcp',
'templatePath' => 'CRM/Contribute/Page/PcpUserDashboard.tpl',
$this->assign('pcpInfo', $pcpInfo);
}
- if (!empty($this->_userOptions['Assigned Activities']) && empty($this->_isChecksumUser)) {
+ if (!empty($dashboardOptions['Assigned Activities']) && empty($this->_isChecksumUser)) {
// Assigned Activities section
$dashboardElements[] = array(
'class' => 'crm-dashboard-assignedActivities',
$this->assign('dashboardElements', $dashboardElements);
// return true when 'Invoices / Credit Notes' checkbox is checked
- $this->assign('invoices', $this->_userOptions['Invoices / Credit Notes']);
+ $this->assign('invoices', $dashboardOptions['Invoices / Credit Notes']);
- if (!empty($this->_userOptions['Groups'])) {
+ if (!empty($dashboardOptions['Groups'])) {
$this->assign('showGroup', TRUE);
//build group selector
$gContact = new CRM_Contact_Page_View_UserDashBoard_GroupContact();