public function getTrueBooleanOption()
    {
        if (!$this->isBoolean()) {
            return null;
        }

        $options = $this->getOptionsByLang($this->defaultLang);

        if (isset($options[1])) {
            return $options[1];
        }

        if (isset($options[0])) {
            return $options[0];
        }

        $label = new Label('Yes', $this->getLocaleKey(''), true, $this->defaultLang, $this->getFieldId(1), 1);

        return $label;
    }
public function getTrueBooleanOption()
    {
        if (!$this->isBoolean()) {
            return null;
        }

        $options = $this->getOptionsByLang($this->defaultLang);

        if (isset($options[1])) {
            return $options[1];
        }

        if (isset($options[0])) {
            return $options[0];
        }

        $label = new Label('Yes', $this->getLocaleKey(''), true, $this->defaultLang, $this->getFieldId(1), 1);

        return $label;
    }
public function getTrueBooleanOption ( ) { if ( ! $ this -> isBoolean ( ) ) { return null ; } $ options = $ this -> getOptionsByLang ( $ this -> defaultLang ) ; if ( isset ( $ options [ 1 ] ) ) { return $ options [ 1 ] ; } if ( isset ( $ options [ 0 ] ) ) { return $ options [ 0 ] ; } $ label = new Label ( 'Yes' , $ this -> getLocaleKey ( '' ) , true , $ this -> defaultLang , $ this -> getFieldId ( 1 ) , 1 ) ; return $ label ; }
Gets the true label for the boolean field.

@return mix(null | restApps\CodeGenerator\Models\Label)
Gets the true label for the boolean field .