Contao\TimePeriod::isSelected PHP Method

isSelected() protected method

Only check against the unit values (see #7246)
protected isSelected ( array $arrOption ) : string
$arrOption array The options array
return string The "selected" attribute or an empty string
    protected function isSelected($arrOption)
    {
        if (empty($this->varValue) && empty($_POST) && $arrOption['default']) {
            return parent::optionSelected(1, 1);
        }
        if (empty($this->varValue) || !is_array($this->varValue)) {
            return '';
        }
        return parent::optionSelected($arrOption['value'], $this->varValue['unit']);
    }