public function detailAction() { $id =
$this->
Request()->
getParam('id'
);
$repository =
$this->
getRepository();
$emotion =
$repository->
getEmotionDetailQuery($id)->
getArrayResult();
$emotion =
$emotion[0
];
if (!
empty($emotion['categories'
])) { $emotion['categories'
] =
array_column($emotion['categories'
], 'id'
);
} $validFrom =
$emotion['validFrom'
];
$validTo =
$emotion['validTo'
];
if ($validFrom instanceof DateTimeInterface
) { $emotion['validFrom'
] =
$validFrom->
format('d.m.Y'
);