'metaTemplates',
'action' => 'view',
$newestMetaTemplate->id
]);
$bodyHtml = '';
$bodyHtml .= sprintf('
%s: %s
', __('Current version'), h($metaTemplate->version));
$bodyHtml .= sprintf('', __('Newest version'), $urlNewestMetaTemplate, h($newestMetaTemplate->version));
$bodyHtml .= sprintf('%s
', __('Entities with meta-fields to be updated:'));
$bodyHtml .= '';
foreach ($entities as $entity) {
$url = Router::url([
'controller' => Inflector::pluralize($metaTemplate->scope),
'action' => 'view',
$entity->id
]);
$bodyHtml .= sprintf(
'- %s %s
',
$url,
__('{0}::{1}', h(Inflector::humanize($metaTemplate->scope)), $entity->id),
__('has {0} meta-fields to update', count($entity->meta_fields))
);
}
if ($amountOfEntitiesToUpdate > 10) {
$bodyHtml .= sprintf('- %s
', __('{0} more entities', $amountOfEntitiesToUpdate - 10));
}
$bodyHtml .= '
';
echo $this->Bootstrap->modal([
'titleHtml' => __('{0} has a new meta-template and meta-fields to be updated', sprintf('%s', h($metaTemplate->name))),
'bodyHtml' => $bodyHtml,
'size' => 'lg',
'type' => 'ok-only',
]);
?>