/** * Handle drawing of license list * * @param array $tag_param * @param array $children */ public function tag_LicenseList($tag_param, $children) { $manager = LicenseManager::getInstance(); $items = $manager->getItems($manager->getFieldNames(), array()); if (isset($tag_params['template'])) { if (isset($tag_params['local']) && $tag_params['local'] == 1) { $template = new TemplateHandler($tag_params['template'], $this->path . 'templates/'); } else { $template = new TemplateHandler($tag_params['template']); } } else { $template = new TemplateHandler('list_item.xml', $this->path . 'templates/'); } if (count($items) > 0) { foreach ($items as $item) { $params = array('license' => $item->license, 'domain' => $item->domain, 'active' => $item->active, 'item_change' => url_MakeHyperlink($this->getLanguageConstant('change'), window_Open('licenses_change', 400, $this->getLanguageConstant('title_licenses_change'), false, false, url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'change'), array('id', $item->id)))), 'item_delete' => url_MakeHyperlink($this->getLanguageConstant('delete'), window_Open('licenses_delete', 400, $this->getLanguageConstant('title_licenses_delete'), false, false, url_Make('transfer_control', 'backend_module', array('module', $this->name), array('backend_action', 'delete'), array('id', $item->id))))); $template->restoreXML(); $template->setLocalParams($params); $template->parse(); } } }