select.optgroupをselect.genericlistに追加する必要があります。これが私のコードです。
foreach ($this->methods as $method) {
if ($this->checkConditions($cart, $method, $cart->pricesUnformatted)) {
$methodSalesPrice = $this->calculateSalesPrice($cart, $method, $cart->pricesUnformatted);
$method->$method_name = $this->renderPluginName($method);
$session = JFactory::getSession();
$htmlI[] = $this->getPluginHtml($method, $selected, $methodSalesPrice);
// this is my attempt
$htmlI[] = JHTML::_('Select.optgroup', 'My optgroup');
// my attempt ends here
$htmlI[] = JHTML::_('Select.genericlist', $this->banks, 'service_issuer', 'size=1', 'key', 'value', $session->get('service_issuer', 0, 'vm'));
$html[] = $htmlI;
}
}
これにより、次が返されます。
array
誰かがこれを以前にやったことがありますか?アドバイスは大歓迎です