'template' => 'LangSwitch.tpl',
'info' => ts('CiviCRM Language Switcher'),
'subject' => '',
- 'templateValues' => array(),
+ 'templateValues' => [],
'active' => TRUE,
'cache' => BLOCK_NO_CACHE,
'visibility' => 1,
'template' => 'Event.tpl',
'info' => ts('CiviCRM Upcoming Events'),
'subject' => ts('Upcoming Events'),
- 'templateValues' => array(),
+ 'templateValues' => [],
'active' => TRUE,
'cache' => BLOCK_NO_CACHE,
'visibility' => 1,
*/
public static function getInfo() {
- $block = array();
+ $block = [];
foreach (self::properties() as $id => $value) {
if ($value['active']) {
if (in_array($id, array(
private static function setTemplateShortcutValues() {
$config = CRM_Core_Config::singleton();
- static $shortCuts = array();
+ static $shortCuts = [];
if (!($shortCuts)) {
if (CRM_Core_Permission::check('add contacts')) {
}
}
- $values = array();
+ $values = [];
foreach ($shortCuts as $key => $short) {
$values[$key] = self::setShortCutValues($short);
}
* @return array
*/
private static function setShortcutValues($short) {
- $value = array();
+ $value = [];
if (isset($short['url'])) {
$value['url'] = $short['url'];
}
* Create the list of dashboard links.
*/
private static function setTemplateDashboardValues() {
- static $dashboardLinks = array();
+ static $dashboardLinks = [];
if (CRM_Core_Permission::check('access Contact Dashboard')) {
$dashboardLinks = array(
array(
return NULL;
}
- $values = array();
+ $values = [];
foreach ($dashboardLinks as $dash) {
- $value = array();
+ $value = [];
if (isset($dash['url'])) {
$value['url'] = $dash['url'];
}
);
}
- $values = array();
+ $values = [];
foreach ($shortCuts as $short) {
- $value = array();
+ $value = [];
$value['url'] = CRM_Utils_System::url($short['path'], $short['query']);
$value['title'] = $short['title'];
$values[] = $value;
return NULL;
}
- $block = array();
+ $block = [];
$block['name'] = 'block-civicrm';
$block['id'] = $block['name'] . '_' . $id;
$block['subject'] = self::fetch($id, 'Subject.tpl',