modal_configurations || ($modal = ModalModel::findPublishedById($model->modal_configurations)) === null) { return new Response(); } $id = $modal->id; $template->details = function () use ($id) { $strDetails = ''; $objElement = ContentModel::findPublishedByPidAndTable($id, 'tl_vr_modal'); if ($objElement !== null) { while ($objElement->next()) { $strDetails .= Controller::getContentElement($objElement->current()); } } return $strDetails; }; $template->hasDetails = static function () use ($id) { return ContentModel::countPublishedByPidAndTable($id, 'tl_vr_modal') > 0; }; $template->modal_configuration = $modal->row(); $GLOBALS['TL_BODY'][] = $template->parse(); return new Response(); } }