public function loadChoice(Property $property, $helperName, $choiceValue, array $options=array())
    {
        if ($this->getHelper('choice')->hasKey($helperName)) {
            /**
             * @var $formHelper FormHelperChoiceInterface
             */
            $formHelper = $this->getHelper('choice')->get($helperName);
            $tmpFormHelper = clone $formHelper;
            $tmpFormHelper->setProperty($property);
            if (is_array($choiceValue)) {
                $tmpFormHelper->setChoices($choiceValue);
            } else {
                $tmpFormHelper->setChoice($choiceValue);
            }
            $tmpFormHelper->setOptions($options);
            return $tmpFormHelper->render();
        } else {
            throw new InvalidArgumentException('unkown form helper ' . $helperName);
        }
    }
public function loadChoice(Property $property, $helperName, $choiceValue, array $options=array())
    {
        if ($this->getHelper('choice')->hasKey($helperName)) {
            /**
             * @var $formHelper FormHelperChoiceInterface
             */
            $formHelper = $this->getHelper('choice')->get($helperName);
            $tmpFormHelper = clone $formHelper;
            $tmpFormHelper->setProperty($property);
            if (is_array($choiceValue)) {
                $tmpFormHelper->setChoices($choiceValue);
            } else {
                $tmpFormHelper->setChoice($choiceValue);
            }
            $tmpFormHelper->setOptions($options);
            return $tmpFormHelper->render();
        } else {
            throw new InvalidArgumentException('unkown form helper ' . $helperName);
        }
    }
public function loadChoice ( Property $ property , $ helperName , $ choiceValue , array $ options = array ( ) ) { if ( $ this -> getHelper ( 'choice' ) -> hasKey ( $ helperName ) ) { /**
             * @var $formHelper FormHelperChoiceInterface
             */ $ formHelper = $ this -> getHelper ( 'choice' ) -> get ( $ helperName ) ; $ tmpFormHelper = clone $ formHelper ; $ tmpFormHelper -> setProperty ( $ property ) ; if ( is_array ( $ choiceValue ) ) { $ tmpFormHelper -> setChoices ( $ choiceValue ) ; } else { $ tmpFormHelper -> setChoice ( $ choiceValue ) ; } $ tmpFormHelper -> setOptions ( $ options ) ; return $ tmpFormHelper -> render ( ) ; } else { throw new InvalidArgumentException ( 'unkown form helper ' . $ helperName ) ; } }
load and render form help choice

@param     Property      $property           property instance
@param     string            $helperName         form helper choice name
@param     mixed             $choiceValue        form helper choice value or values
@param     array             $options            form helper options
@return    string        rendered html

@throws  InvalidArgumentException
load and render form help choice