src/Charcoal/Admin/Property/AbstractSelectableInput.php
public function isChoiceSelected($choice)
    {
        $val = $this->parsedVal();

        if ($val === null) {
            return false;
        }

        if (isset($choice['value'])) {
            $choice = $choice['value'];
        }

        if ($this->p()->multiple()) {
            return in_array($choice, $val);
        } else {
            return $choice == $val;
        }
    }
public function isChoiceSelected($choice)
    {
        $val = $this->parsedVal();

        if ($val === null) {
            return false;
        }

        if (isset($choice['value'])) {
            $choice = $choice['value'];
        }

        if ($this->p()->multiple()) {
            return in_array($choice, $val);
        } else {
            return $choice == $val;
        }
    }
public function isChoiceSelected ( $ choice ) { $ val = $ this -> parsedVal ( ) ; if ( $ val === null ) { return false ; } if ( isset ( $ choice [ 'value' ] ) ) { $ choice = $ choice [ 'value' ] ; } if ( $ this -> p ( ) -> multiple ( ) ) { return in_array ( $ choice , $ val ) ; } else { return $ choice == $ val ; } }
Determine if the provided option is a selected value.

@param  mixed $choice The choice to check.
@return boolean
Determine if the provided option is a selected value .