public function option(Option $option)
    {
        $value = $option->getLabel() ?: htmlentities($option->getValue(), ENT_QUOTES, 'UTF-8');
        $tag = new Tag('option', $value);

        if ($option->isSelected()) {
            $tag->setAttribute('selected', 'selected');
        }

        return $this->parseTag($tag, $option);
    }
public function option(Option $option)
    {
        $value = $option->getLabel() ?: htmlentities($option->getValue(), ENT_QUOTES, 'UTF-8');
        $tag = new Tag('option', $value);

        if ($option->isSelected()) {
            $tag->setAttribute('selected', 'selected');
        }

        return $this->parseTag($tag, $option);
    }
public function option ( Option $ option ) { $ value = $ option -> getLabel ( ) ? : htmlentities ( $ option -> getValue ( ) , ENT_QUOTES , 'UTF-8' ) ; $ tag = new Tag ( 'option' , $ value ) ; if ( $ option -> isSelected ( ) ) { $ tag -> setAttribute ( 'selected' , 'selected' ) ; } return $ this -> parseTag ( $ tag , $ option ) ; }
Render an Option

@param Option $option
@return string
Render an Option