3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
21 * (clearly copied & pasted from a drupal class).
25 class CRM_Core_Joomla
{
28 * Reuse drupal blocks into a left sidebar.
30 * Assign the generated template to the smarty instance.
32 public static function sidebarLeft() {
33 $config = CRM_Core_Config
::singleton();
35 if ($config->userFrameworkFrontend
) {
40 CRM_Core_Block
::CREATE_NEW
,
41 CRM_Core_Block
::RECENTLY_VIEWED
,
42 CRM_Core_Block
::DASHBOARD
,
44 CRM_Core_Block
::LANGSWITCH
,
45 //CRM_Core_Block::EVENT,
46 //CRM_Core_Block::FULLTEXT_SEARCH
50 foreach ($blockIds as $id) {
51 $blocks[] = CRM_Core_Block
::getContent($id);
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);