Update template pathes to new syntax

This commit is contained in:
2023-10-02 13:56:22 +02:00
parent 294aaf5bed
commit bad302f512
13 changed files with 30 additions and 30 deletions

View File

@@ -26,6 +26,6 @@ class AdminController extends AbstractController
*/
public function indexAction(): Response
{
return $this->render('ChillCustomFieldsBundle:Admin:layout.html.twig');
return $this->render('@ChillCustomFields/Admin/layout.html.twig');
}
}

View File

@@ -48,7 +48,7 @@ class CustomFieldController extends AbstractController
$this->addFlash('error', $this->get('translator')
->trans('The custom field form contains errors'));
return $this->render('ChillCustomFieldsBundle:CustomField:new.html.twig', [
return $this->render('@ChillCustomFields/CustomField/new.html.twig', [
'entity' => $entity,
'form' => $form->createView(),
]);
@@ -71,7 +71,7 @@ class CustomFieldController extends AbstractController
$editForm = $this->createEditForm($entity, $entity->getType());
return $this->render('ChillCustomFieldsBundle:CustomField:edit.html.twig', [
return $this->render('@ChillCustomFields/CustomField/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
]);
@@ -103,7 +103,7 @@ class CustomFieldController extends AbstractController
$form = $this->createCreateForm($entity, $request->query->get('type'));
return $this->render('ChillCustomFieldsBundle:CustomField:new.html.twig', [
return $this->render('@ChillCustomFields/CustomField/new.html.twig', [
'entity' => $entity,
'form' => $form->createView(),
]);
@@ -138,7 +138,7 @@ class CustomFieldController extends AbstractController
$this->addFlash('error', $this->get('translator')
->trans('The custom field form contains errors'));
return $this->render('ChillCustomFieldsBundle:CustomField:edit.html.twig', [
return $this->render('@ChillCustomFields/CustomField/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
]);

View File

@@ -63,7 +63,7 @@ class CustomFieldsGroupController extends AbstractController
$this->addFlash('error', $this->translator
->trans('The custom fields group form contains errors'));
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:new.html.twig', [
return $this->render('@ChillCustomFields/CustomFieldsGroup/new.html.twig', [
'entity' => $entity,
'form' => $form->createView(),
]);
@@ -85,7 +85,7 @@ class CustomFieldsGroupController extends AbstractController
$editForm = $this->createEditForm($entity);
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', [
return $this->render('@ChillCustomFields/CustomFieldsGroup/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
]);
@@ -111,7 +111,7 @@ class CustomFieldsGroupController extends AbstractController
}
}
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:index.html.twig', [
return $this->render('@ChillCustomFields/CustomFieldsGroup/index.html.twig', [
'entities' => $cfGroups,
'default_groups' => $defaultGroups,
'make_default_forms' => $makeDefaultFormViews,
@@ -174,7 +174,7 @@ class CustomFieldsGroupController extends AbstractController
$entity = new CustomFieldsGroup();
$form = $this->createCreateForm($entity);
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:new.html.twig', [
return $this->render('@ChillCustomFields/CustomFieldsGroup/new.html.twig', [
'entity' => $entity,
'form' => $form->createView(),
]);
@@ -213,7 +213,7 @@ class CustomFieldsGroupController extends AbstractController
if ($form->isSubmitted()) {
if ($form->get('submit_render')->isClicked()) {
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:render_for_test.html.twig', [
return $this->render('@ChillCustomFields/CustomFieldsGroup/render_for_test.html.twig', [
'fields' => $form->getData(),
'customFieldsGroup' => $entity,
]);
@@ -247,7 +247,7 @@ class CustomFieldsGroupController extends AbstractController
$options = $this->getOptionsAvailable($entity->getEntity());
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:show.html.twig', [
return $this->render('@ChillCustomFields/CustomFieldsGroup/show.html.twig', [
'entity' => $entity,
'create_field_form' => $this->createCreateFieldForm($entity)->createView(),
'options' => $options,
@@ -284,7 +284,7 @@ class CustomFieldsGroupController extends AbstractController
$this->addFlash('error', $this->translator
->trans('The custom fields group form contains errors'));
return $this->render('ChillCustomFieldsBundle:CustomFieldsGroup:edit.html.twig', [
return $this->render('@ChillCustomFields/CustomFieldsGroup/edit.html.twig', [
'entity' => $entity,
'edit_form' => $editForm->createView(),
]);

View File

@@ -289,7 +289,7 @@ class CustomFieldChoice extends AbstractCustomField
$choices[] = ['name' => $value['_other'], 'slug' => '_other'];
}
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:choice.html.twig';
$template = '@ChillCustomFields/CustomFieldsRendering/choice.html.twig';
if ('csv' === $documentType) {
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:choice.csv.twig';

View File

@@ -90,7 +90,7 @@ class CustomFieldText extends AbstractCustomField
public function render($value, CustomField $customField, $documentType = 'html')
{
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:text.html.twig';
$template = '@ChillCustomFields/CustomFieldsRendering/text.html.twig';
if ('csv' === $documentType) {
$template = 'ChillCustomFieldsBundle:CustomFieldsRendering:text.csv.twig';

View File

@@ -82,7 +82,7 @@ class CustomFieldTitle extends AbstractCustomField
{
return $this->templating
->render(
'ChillCustomFieldsBundle:CustomFieldsRendering:title.html.twig',
'@ChillCustomFields/CustomFieldsRendering/title.html.twig',
[
'title' => $customField->getName(),
'type' => $customField->getOptions()[self::TYPE],

View File

@@ -77,7 +77,7 @@ class CustomFieldRenderingTwig extends AbstractExtension
* Twig Extension that is used to render the label of a custom field.
*
* @param CustomField $customField Either a customField OR a customizable_entity OR the FQDN of the entity
* @param array $params The parameters for rendering. Currently, 'label_layout' allow to choose a different label. Default is 'ChillCustomFieldsBundle:CustomField:render_label.html.twig'
* @param array $params The parameters for rendering. Currently, 'label_layout' allow to choose a different label. Default is '@ChillCustomFields/CustomField/render_label.html.twig'
*
* @return string HTML representation of the custom field label.
*/

View File

@@ -76,7 +76,7 @@ final class CustomFieldsGroupRenderingTwig extends AbstractExtension
* @param string $documentType The type of the document (csv, html)
* @param array $params The parameters for rendering :
* - layout : allow to choose a different layout by default :
* ChillCustomFieldsBundle:CustomFieldsGroup:render.html.twig
* @ChillCustomFields/CustomFieldsGroup/render.html.twig
* - show_empty : force show empty field
*
* @return string HTML representation of the custom field group value, as described in