main/core/API/Serializer/Resource/ResourceUserEvaluationSerializer.php
public function serialize(ResourceUserEvaluation $resourceUserEvaluation)
    {
        $serialized = [
            'id' => $resourceUserEvaluation->getId(),
            'date' => $resourceUserEvaluation->getDate() ? $resourceUserEvaluation->getDate()->format('Y-m-d H:i') : null,
            'status' => $resourceUserEvaluation->getStatus(),
            'duration' => $resourceUserEvaluation->getDuration(),
            'score' => $resourceUserEvaluation->getScore(),
            'scoreMin' => $resourceUserEvaluation->getScoreMin(),
            'scoreMax' => $resourceUserEvaluation->getScoreMax(),
            'customScore' => $resourceUserEvaluation->getCustomScore(),
            'progression' => $resourceUserEvaluation->getProgression(),
            'resourceNode' => $this->resourceNodeSerializer->serialize($resourceUserEvaluation->getResourceNode()),
            'user' => $this->userSerializer->serialize($resourceUserEvaluation->getUser()),
            'userName' => $resourceUserEvaluation->getUserName(),
            'nbAttempts' => $resourceUserEvaluation->getNbAttempts(),
            'nbOpenings' => $resourceUserEvaluation->getNbOpenings(),
        ];

        return $serialized;
    }
public function serialize(ResourceUserEvaluation $resourceUserEvaluation)
    {
        $serialized = [
            'id' => $resourceUserEvaluation->getId(),
            'date' => $resourceUserEvaluation->getDate() ? $resourceUserEvaluation->getDate()->format('Y-m-d H:i') : null,
            'status' => $resourceUserEvaluation->getStatus(),
            'duration' => $resourceUserEvaluation->getDuration(),
            'score' => $resourceUserEvaluation->getScore(),
            'scoreMin' => $resourceUserEvaluation->getScoreMin(),
            'scoreMax' => $resourceUserEvaluation->getScoreMax(),
            'customScore' => $resourceUserEvaluation->getCustomScore(),
            'progression' => $resourceUserEvaluation->getProgression(),
            'resourceNode' => $this->resourceNodeSerializer->serialize($resourceUserEvaluation->getResourceNode()),
            'user' => $this->userSerializer->serialize($resourceUserEvaluation->getUser()),
            'userName' => $resourceUserEvaluation->getUserName(),
            'nbAttempts' => $resourceUserEvaluation->getNbAttempts(),
            'nbOpenings' => $resourceUserEvaluation->getNbOpenings(),
        ];

        return $serialized;
    }
public function serialize ( ResourceUserEvaluation $ resourceUserEvaluation ) { $ serialized = [ 'id' => $ resourceUserEvaluation -> getId ( ) , 'date' => $ resourceUserEvaluation -> getDate ( ) ? $ resourceUserEvaluation -> getDate ( ) -> format ( 'Y-m-d H:i' ) : null , 'status' => $ resourceUserEvaluation -> getStatus ( ) , 'duration' => $ resourceUserEvaluation -> getDuration ( ) , 'score' => $ resourceUserEvaluation -> getScore ( ) , 'scoreMin' => $ resourceUserEvaluation -> getScoreMin ( ) , 'scoreMax' => $ resourceUserEvaluation -> getScoreMax ( ) , 'customScore' => $ resourceUserEvaluation -> getCustomScore ( ) , 'progression' => $ resourceUserEvaluation -> getProgression ( ) , 'resourceNode' => $ this -> resourceNodeSerializer -> serialize ( $ resourceUserEvaluation -> getResourceNode ( ) ) , 'user' => $ this -> userSerializer -> serialize ( $ resourceUserEvaluation -> getUser ( ) ) , 'userName' => $ resourceUserEvaluation -> getUserName ( ) , 'nbAttempts' => $ resourceUserEvaluation -> getNbAttempts ( ) , 'nbOpenings' => $ resourceUserEvaluation -> getNbOpenings ( ) , ] ; return $ serialized ; }
Serializes a ResourceUserEvaluation entity for the JSON api.

@param ResourceUserEvaluation $resourceUserEvaluation

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