element['class'] ? ' class="radio '.(string) $this->element['class'].'"' : ' class="radio"'; // Start the radio field output. $html[] = '
'; return implode($html); } protected function getOptionsDesign1() { $options = array(); foreach ($this->element->children() as $option) { $tmp = new CMSObject(); if ($option->getName() != 'option') { continue; } $tmp->value = (string) $option['value']; $tmp->text = trim((string) $option); switch((int)$option['value']) { case 1: $optName = 'grey'; break; case 2: $optName = 'grey'; break;//$optName = 'greywb';the same but other padding case 3: $optName = 'greyrc'; break; case 4: $optName = 'black'; break; default: case 0: $optName = 'none'; break; } if ((int)$option['value'] == 0) { $tmp->img = ''; } else { $tmp->img = HTMLHelper::_('image', 'components/com_phocamaps/assets/images/box-'.$optName.'-tl.png', '', array('style' => 'margin:0;padding:0')); } //$tmp->class = (string) $option['class']; //$tmp->onclick = (string) $option['onclick']; $options[] = $tmp; } reset($options); return $options; } protected function getOptionsDesign2() { $options = array(); $i = 1; foreach ($this->element->children() as $option) { $tmp = new CMSObject(); if ($option->getName() != 'option') { continue; } $tmp->value = (string) $option['value']; $tmp->text = trim((string) $option); switch((int)$option['value']) { case 1: $optName = 'igrey'; break; case 2: $optName = 'iyellow'; break; case 3: $optName = 'ihome'; break; case 4: $optName = 'igreen'; break; case 5: $optName = 'istar'; break; case 6: $optName = 'iinfoh'; break; case 7: $optName = 'iinfoi'; break; case 8: $optName = 'iinfop'; break; case 9: $optName = 'iinfoph'; break; case 10:$optName = 'iinfoz'; break; default: case 0: $optName = 'default'; break; } if ((int)$option['value'] == 0) { $tmp->img = ''; $tmp->imgnr = 0; } else { $tmp->img = HTMLHelper::_('image', 'media/com_phocamaps/images/'.$optName.'/image.png', '', array('style' => 'margin:0;padding:0')); $tmp->imgnr = $i; $i++; } //$tmp->class = (string) $option['class']; //$tmp->onclick = (string) $option['onclick']; $options[] = $tmp; } reset($options); return $options; } }