public function serialize(LtiResource $ltiResource, array $options = [])
    {
        $serialized = [
            'id' => $ltiResource->getUuid(),
            'openInNewTab' => $ltiResource->getOpenInNewTab(),
            'ratio' => $ltiResource->getRatio(),
            'ltiApp' => $ltiResource->getLtiApp() ?
                $this->ltiAppSerializer->serialize($ltiResource->getLtiApp(), [Options::SERIALIZE_MINIMAL]) :
                null,
            'ltiData' => $this->serializeLtiData($ltiResource),
        ];

        return $serialized;
    }
public function serialize(LtiResource $ltiResource, array $options = [])
    {
        $serialized = [
            'id' => $ltiResource->getUuid(),
            'openInNewTab' => $ltiResource->getOpenInNewTab(),
            'ratio' => $ltiResource->getRatio(),
            'ltiApp' => $ltiResource->getLtiApp() ?
                $this->ltiAppSerializer->serialize($ltiResource->getLtiApp(), [Options::SERIALIZE_MINIMAL]) :
                null,
            'ltiData' => $this->serializeLtiData($ltiResource),
        ];

        return $serialized;
    }
public function serialize ( LtiResource $ ltiResource , array $ options = [ ] ) { $ serialized = [ 'id' => $ ltiResource -> getUuid ( ) , 'openInNewTab' => $ ltiResource -> getOpenInNewTab ( ) , 'ratio' => $ ltiResource -> getRatio ( ) , 'ltiApp' => $ ltiResource -> getLtiApp ( ) ? $ this -> ltiAppSerializer -> serialize ( $ ltiResource -> getLtiApp ( ) , [ Options :: SERIALIZE_MINIMAL ] ) : null , 'ltiData' => $ this -> serializeLtiData ( $ ltiResource ) , ] ; return $ serialized ; }
Serializes a LTI resource for the JSON api.

@param LtiResource $ltiResource - the LTI resource to serialize
@param array       $options     - a list of serialization options

@return array - the serialized representation of the LTI resource
Serializes a LTI resource for the JSON api .