plugin/exo/Serializer/Misc/CellChoiceSerializer.php
public function serialize(CellChoice $choice, array $options = [])
    {
        $serialized = [
            'text' => $choice->getText(),
            'caseSensitive' => $choice->isCaseSensitive(),
            'score' => $choice->getScore(),
            'expected' => $choice->isExpected(),
        ];

        if ($choice->getFeedback()) {
            $serialized['feedback'] = $choice->getFeedback();
        }

        return $serialized;
    }
public function serialize(CellChoice $choice, array $options = [])
    {
        $serialized = [
            'text' => $choice->getText(),
            'caseSensitive' => $choice->isCaseSensitive(),
            'score' => $choice->getScore(),
            'expected' => $choice->isExpected(),
        ];

        if ($choice->getFeedback()) {
            $serialized['feedback'] = $choice->getFeedback();
        }

        return $serialized;
    }
public function serialize ( CellChoice $ choice , array $ options = [ ] ) { $ serialized = [ 'text' => $ choice -> getText ( ) , 'caseSensitive' => $ choice -> isCaseSensitive ( ) , 'score' => $ choice -> getScore ( ) , 'expected' => $ choice -> isExpected ( ) , ] ; if ( $ choice -> getFeedback ( ) ) { $ serialized [ 'feedback' ] = $ choice -> getFeedback ( ) ; } return $ serialized ; }
Converts a CellChoice into a JSON-encodable structure.

@param CellChoice $choice
@param array      $options

@return array
Converts a CellChoice into a JSON - encodable structure .