->
from(Emotion::
class, 'emotion'
) ->
leftJoin('emotion.elements', 'elements'
) ->
leftJoin('elements.viewports', 'viewports'
) ->
leftJoin('elements.component', 'component'
) ->
leftJoin('component.fields', 'fields'
) ->
leftJoin('elements.data', 'data'
) ->
where('emotion.id = :emotionId'
) ->
orderBy('elements.id'
) ->
setParameter('emotionId',
$emotionId) ->
getQuery() ->
getSingleResult(Query::HYDRATE_ARRAY
);
} /**
* @param bool $keepName
*
* @return array
*/
private function cleanupEmotionData(array
$emotionData,
$keepName = false
) { unset( $emotionData['parentId'
],