<?php // No direct access to this file defined('_JEXEC') or die('Restricted Access'); function generateRow($index, $container_type) { return XmlTagHelper::formatTableRow(array(XmlTagHelper::formatTableCell(JHtmlGrid::id($index, $container_type->id)), XmlTagHelper::formatTableCell(JText::_($container_type->container_name)), XmlTagHelper::formatTableCell($container_type->liters))); } function generateTableData($container_types) { $tableData = array(); foreach ($container_types as $index => $container_type) { $tableData[] = generateRow($index, $container_type); } return $tableData; } $xmlTag = new XmlTag(); if (isset($this->container_types)) { $tableContent = generateTableData($this->container_types); $xmlTag->FORM(array('action' => 'index.php?option=com_reomi&view=container_types', 'id' => 'adminForm', 'method' => 'post', 'name' => 'adminForm'), $xmlTag()->TABLE(array('class' => 'table table-striped table-hover'), $xmlTag()->THEAD($xmlTag()->TR($xmlTag()->TH(JHtmlGrid::checkall())->TH(JText::_('COM_ROEMI_ADMIN_VIEW_CONTAINER_TYPES_TABLE_HEADER_CONTAINER'))->TH(JText::_('COM_ROEMI_ADMIN_VIEW_CONTAINER_TYPES_TABLE_HEADER_LITERS'))))->TBODY($xmlTag()->__fromArray($tableContent)))->INPUT(array('type' => 'hidden', 'name' => 'task', 'value' => ''))->INPUT(array('type' => 'hidden', 'name' => 'boxchecked', 'value' => '0'))->_(JHtmlForm::token())); } else { $xmlTag->P(JText::_('COM_ROEMI_ADMIN_VIEW_CONTAINER_TYPES_EMPTY_TABLE_MSG')); } echo $xmlTag;
<?php // No direct access defined('_JEXEC') or die('Restricted access'); $xmlTag = new XmlTag(); $xmlTag->FORM(array('action' => JRoute::_('index.php?option=com_reomi&view=collection_fee&layout=edit&id=' . (int) $this->item->id), 'id' => 'adminForm', 'method' => 'post', 'name' => 'adminForm'), $xmlTag()->DIV(array('class' => 'form-horizontal'), $xmlTag()->FIELDSET(array('class' => 'adminForm'), $xmlTag()->LEGEND(JText::_('COM_REOMI_ADMIN_VIEW_COLLECTION_FEE_FORM_LEGEND'))->DIV(array('class' => 'row-fluid'), $xmlTag()->DIV(array('class' => 'span6'), $xmlTag()->__fromArray(XmlTagHelper::formatFormFields($this->form->getFieldset()))))))->INPUT(array('name' => 'task', 'type' => 'hidden', 'value' => 'collection_fee.edit'))->_(JHtmlForm::token())); echo $xmlTag;