/** * Generates shipping method type list * * @param string The value of the HTML name attribute * @param string Additional HTML attributes for the <select> tag * @param mixed The key that is selected * @returns string HTML for the radio list */ public static function shippingtype($selected, $name = 'filter_shipping_method_type', $attribs = array('class' => 'inputbox'), $idtag = null, $allowAny = false, $title = 'K2STORE_SELECT_SHIPPING_TYPE') { $list = array(); if ($allowAny) { $list[] = self::option('', "- " . JText::_($title) . " -"); } require_once JPATH_ADMINISTRATOR . '/components/com_k2store/library/shipping.php'; $items = K2StoreShipping::getTypes(); foreach ($items as $item) { $list[] = JHTML::_('select.option', $item->id, $item->title); } return self::genericlist($list, $name, $attribs, 'value', 'text', $selected, $idtag); }