Contao\Controller::optionSelected PHP Method

optionSelected() public static method

Return a "selected" attribute if the option is selected
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use Widget::optionSelected() instead.
public static optionSelected ( string $strOption, mixed $varValues ) : string
$strOption string The option to check
$varValues mixed One or more values to check against
return string The attribute or an empty string
    public static function optionSelected($strOption, $varValues)
    {
        @trigger_error('Using Controller::optionSelected() has been deprecated and will no longer work in Contao 5.0. Use Widget::optionSelected() instead.', E_USER_DEPRECATED);
        return \Widget::optionSelected($strOption, $varValues);
    }