function display($tpl = null) { /** @var $gantry Gantry */ global $gantry; $language = JFactory::getLanguage(); $language->load('com_templates'); $this->item = $this->get('Item'); JHtml::_('behavior.framework', true); require_once JPATH_LIBRARIES . "/gantry/gantry.php"; gantry_import('core.config.gantryform'); GantryForm::addFormPath(JPATH_COMPONENT_ADMINISTRATOR); GantryForm::addFormPath($gantry->templatePath); GantryForm::addFieldPath($gantry->gantryPath . '/admin/forms/fields'); GantryForm::addFieldPath($gantry->templatePath . '/fields'); GantryForm::addFieldPath($gantry->templatePath . '/admin/forms/fields'); GantryForm::addGroupPath($gantry->gantryPath . '/admin/forms/groups'); GantryForm::addGroupPath($gantry->templatePath . '/admin/forms/groups'); $this->state = $this->get('State'); $this->form = $this->get('Form'); $this->override = $this->get('Override'); $this->gantryForm = $this->get('GantryForm'); $this->activeTab = isset($_COOKIE['gantry-admin-tab']) ? $_COOKIE['gantry-admin-tab'] + 1 : 1; $this->tabs = $this->getTabs($this->gantryForm); $this->assignmentCount = $this->getAssignmentCount($this->item->id); $model = $this->getModel(); $model->checkForGantryUpdate(); //$this->addToolbar(); JToolBarHelper::title(''); ob_start(); parent::display($tpl); $buffer = ob_get_clean(); echo $buffer; }
/** * Gets the xml config for all gantry widgets * @return void */ function _getWidgetConfigs() { gantry_import('core.config.gantryform'); $form_paths = array($this->gantryPath . DS . 'widgets', $this->templatePath . DS . 'widgets'); foreach ($form_paths as $form_path) { if (file_exists($form_path) && is_dir($form_path)) { GantryForm::addFormPath($form_path); } } $field_paths = array($this->gantryPath . DS . 'admin/forms/fields', $this->templatePath . DS . 'admin/forms/fields'); foreach ($field_paths as $field_path) { if (file_exists($field_path) && is_dir($field_path)) { GantryForm::addFieldPath($field_path); } } $group_paths = array($this->gantryPath . DS . 'admin/forms/groups', $this->templatePath . DS . 'admin/forms/groups'); foreach ($group_paths as $group_path) { if (file_exists($group_path) && is_dir($group_path)) { GantryForm::addGroupPath($group_path); } } }