Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@chadhutchins
Last active September 26, 2019 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadhutchins/bc27ad961733072dd0d22a478c5e7043 to your computer and use it in GitHub Desktop.
Save chadhutchins/bc27ad961733072dd0d22a478c5e7043 to your computer and use it in GitHub Desktop.
<?php
$admin = BeanFactory::getBean('Administration');
$admin->retrieveSettings('fanaticalzendesk');
$encoded_string = $admin->settings['fanaticalzendesk_dashlet_mapping'];
$decoded_mapping = unserialize(base64_decode($encoded_string));
$fzDashletSupportedModules = array_keys($decoded_mapping);
$GLOBALS['log']->fatal('fzDashletSupportedModules: '.print_r($fzDashletSupportedModules,true));
// ^^^ when I view the logs it looks correct, looks like this: (fl_Orders being the custom module I'm adding)
// array('Contacts','Accounts','Leads','Prospects','Opportunities','fl_Orders');
$viewdefs['base']['view']['fanatical-zendesk-dashlet'] = array(
'dashlets' => array(
array(
'name' => 'LBL_FANATICALZENDESK_DASHLET_NAME',
// ...
// ...
// ..
'filter' => array(
'module' => array(
$fzDashletSupportedModules
),
'view' => 'record'
),
),
),
// ...
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment