src/Charcoal/Admin/Property/Input/DualSelectInput.php
public function selectedChoices()
    {
        $val = $this->parsedVal();

        if ($val !== null) {
            if (!$this->p()->multiple()) {
                $val = [$val];
            }

            $choices = iterator_to_array(parent::choices());

            /* Filter the all options down to those selected */
            foreach ($val as $v) {
                if (isset($choices[$v])) {
                    yield $choices[$v];
                }
            }
        }
    }
public function selectedChoices()
    {
        $val = $this->parsedVal();

        if ($val !== null) {
            if (!$this->p()->multiple()) {
                $val = [$val];
            }

            $choices = iterator_to_array(parent::choices());

            /* Filter the all options down to those selected */
            foreach ($val as $v) {
                if (isset($choices[$v])) {
                    yield $choices[$v];
                }
            }
        }
    }
public function selectedChoices ( ) { $ val = $ this -> parsedVal ( ) ; if ( $ val !== null ) { if ( ! $ this -> p ( ) -> multiple ( ) ) { $ val = [ $ val ] ; } $ choices = iterator_to_array ( parent :: choices ( ) ) ; /* Filter the all options down to those selected */ foreach ( $ val as $ v ) { if ( isset ( $ choices [ $ v ] ) ) { yield $ choices [ $ v ] ; } } } }
Retrieve the selected options.

@return Generator|array
Retrieve the selected options .