Search Builder - Enhance UI with Select2 and EntityRef
[civicrm-core.git] / CRM / Core / Joomla.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
bc77d7c0 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
bc77d7c0
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 *
14 * @package CRM
ca5cec67 15 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
16 */
17
18/**
8eedd10a 19 * Joomla class.
20 *
21 * (clearly copied & pasted from a drupal class).
6a488035 22 *
8eedd10a 23 * Still used?
6a488035
TO
24 */
25class CRM_Core_Joomla {
26
27 /**
8eedd10a 28 * Reuse drupal blocks into a left sidebar.
6a488035 29 *
8eedd10a 30 * Assign the generated template to the smarty instance.
6a488035 31 */
00be9182 32 public static function sidebarLeft() {
6a488035
TO
33 $config = CRM_Core_Config::singleton();
34
35 if ($config->userFrameworkFrontend) {
36 return;
37 }
38
be2fb01f 39 $blockIds = [
6a488035
TO
40 CRM_Core_Block::CREATE_NEW,
41 CRM_Core_Block::RECENTLY_VIEWED,
42 CRM_Core_Block::DASHBOARD,
43 CRM_Core_Block::ADD,
44 CRM_Core_Block::LANGSWITCH,
45 //CRM_Core_Block::EVENT,
46 //CRM_Core_Block::FULLTEXT_SEARCH
be2fb01f 47 ];
6a488035 48
be2fb01f 49 $blocks = [];
6a488035
TO
50 foreach ($blockIds as $id) {
51 $blocks[] = CRM_Core_Block::getContent($id);
52 }
53
54 $template = CRM_Core_Smarty::singleton();
55 $template->assign_by_ref('blocks', $blocks);
56 $sidebarLeft = $template->fetch('CRM/Block/blocks.tpl');
57 $template->assign_by_ref('sidebarLeft', $sidebarLeft);
58 }
96025800 59
6a488035 60}