Example #1
0
 function gantry_admin_setup()
 {
     gantry_import('core.gantry');
     gantry_import('core.utilities.gantrycache');
     global $gantry;
     $template_id = gantry_admin_getCurrentTemplateId();
     $template = gantry_getTemplateById($template_id);
     // TODO: implement cache for the admin gantry objects
     $app =& JFactory::getApplication();
     $cache = GantryCache::getInstance($app->isAdmin());
     $cache->addWatchFile(JPATH_SITE . '/templates/' . $template->template . '/templateDetails.xml');
     $cache->addWatchFile(JPATH_SITE . '/templates/' . $template->template . '/template-options.xml');
     $gantry = $cache->call('Gantry-' . $template->template, array('Gantry', 'getInstance'), array($template->template));
     //$gantry =& Gantry::getInstance($template->template);
     $gantry->adminInit();
 }
Example #2
0
 /**
  *
  */
 function gantry_admin_setup()
 {
     gantry_import('core.gantry');
     gantry_import('core.utilities.gantrycache');
     /** @var $gantry Gantry */
     global $gantry;
     $template_id = gantry_admin_getCurrentTemplateId();
     $template = gantry_getTemplateById($template_id);
     $cache = GantryCache::getCache(GantryCache::ADMIN_GROUP_NAME, null, true);
     $cache->addWatchFile(JPATH_SITE . '/templates/' . $template->template . '/templateDetails.xml');
     $cache->addWatchFile(JPATH_SITE . '/templates/' . $template->template . '/template-options.xml');
     $gantry = $cache->call('Gantry-' . $template->template, array('Gantry', 'getInstance'), array($template->template));
     $gantry->adminInit();
 }