main/core/API/Serializer/Resource/ResourceEvaluationSerializer.php
public function serialize(ResourceEvaluation $resourceEvaluation)
    {
        $serialized = [
            'id' => $resourceEvaluation->getId(),
            'date' => $resourceEvaluation->getDate() ? $resourceEvaluation->getDate()->format('Y-m-d H:i') : null,
            'status' => $resourceEvaluation->getStatus(),
            'duration' => $resourceEvaluation->getDuration(),
            'score' => $resourceEvaluation->getScore(),
            'scoreMin' => $resourceEvaluation->getScoreMin(),
            'scoreMax' => $resourceEvaluation->getScoreMax(),
            'customScore' => $resourceEvaluation->getCustomScore(),
            'progression' => $resourceEvaluation->getProgression(),
            'comment' => $resourceEvaluation->getComment(),
            'data' => $resourceEvaluation->getData(),
            'resourceUserEvaluation' => $this->resourceUserEvaluationSerializer->serialize($resourceEvaluation->getResourceUserEvaluation()),
        ];

        return $serialized;
    }
public function serialize(ResourceEvaluation $resourceEvaluation)
    {
        $serialized = [
            'id' => $resourceEvaluation->getId(),
            'date' => $resourceEvaluation->getDate() ? $resourceEvaluation->getDate()->format('Y-m-d H:i') : null,
            'status' => $resourceEvaluation->getStatus(),
            'duration' => $resourceEvaluation->getDuration(),
            'score' => $resourceEvaluation->getScore(),
            'scoreMin' => $resourceEvaluation->getScoreMin(),
            'scoreMax' => $resourceEvaluation->getScoreMax(),
            'customScore' => $resourceEvaluation->getCustomScore(),
            'progression' => $resourceEvaluation->getProgression(),
            'comment' => $resourceEvaluation->getComment(),
            'data' => $resourceEvaluation->getData(),
            'resourceUserEvaluation' => $this->resourceUserEvaluationSerializer->serialize($resourceEvaluation->getResourceUserEvaluation()),
        ];

        return $serialized;
    }
public function serialize ( ResourceEvaluation $ resourceEvaluation ) { $ serialized = [ 'id' => $ resourceEvaluation -> getId ( ) , 'date' => $ resourceEvaluation -> getDate ( ) ? $ resourceEvaluation -> getDate ( ) -> format ( 'Y-m-d H:i' ) : null , 'status' => $ resourceEvaluation -> getStatus ( ) , 'duration' => $ resourceEvaluation -> getDuration ( ) , 'score' => $ resourceEvaluation -> getScore ( ) , 'scoreMin' => $ resourceEvaluation -> getScoreMin ( ) , 'scoreMax' => $ resourceEvaluation -> getScoreMax ( ) , 'customScore' => $ resourceEvaluation -> getCustomScore ( ) , 'progression' => $ resourceEvaluation -> getProgression ( ) , 'comment' => $ resourceEvaluation -> getComment ( ) , 'data' => $ resourceEvaluation -> getData ( ) , 'resourceUserEvaluation' => $ this -> resourceUserEvaluationSerializer -> serialize ( $ resourceEvaluation -> getResourceUserEvaluation ( ) ) , ] ; return $ serialized ; }
Serializes a ResourceEvaluation entity for the JSON api.

@param ResourceEvaluation $resourceEvaluation

@return array - the serialized representation of the resource evaluation
Serializes a ResourceEvaluation entity for the JSON api .