Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Command/CustomItemsScheduledExportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace MauticPlugin\CustomObjectsBundle\Command;

use Mautic\CoreBundle\Helper\ExitCode;
use Mautic\CoreBundle\Templating\Helper\FormatterHelper;
use Mautic\CoreBundle\Twig\Helper\FormatterHelper;
use MauticPlugin\CustomObjectsBundle\CustomItemEvents;
use MauticPlugin\CustomObjectsBundle\Event\CustomItemExportSchedulerEvent;
use MauticPlugin\CustomObjectsBundle\Model\CustomItemExportSchedulerModel;
Expand Down
22 changes: 11 additions & 11 deletions Config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@
],
CustomItemRouteProvider::ROUTE_EXPORT_ACTION => [
'path' => 'custom/object/{object}/export',
'controller' => 'CustomObjectsBundle:CustomItem\Export:export',
'controller' => 'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ExportController::exportAction',
'method' => 'POST',
],
CustomItemRouteProvider::ROUTE_EXPORT_DOWNLOAD_ACTION => [
'path' => '/custom/item/export/download/{fileName}',
'controller' => 'CustomObjectsBundle:CustomItem\Export:downloadExport',
'controller' => 'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ExportController::downloadExportAction',
],

// Custom Objects
Expand Down Expand Up @@ -392,14 +392,14 @@
],
],
],
'custom_item.contact_list_controller' => [
'class' => \MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ContactListController::class,
'methodCalls' => [
'setContainer' => [
'@service_container',
],
],
],
// 'custom_item.contact_list_controller' => [
// 'class' => \MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ContactListController::class,
// 'methodCalls' => [
// 'setContainer' => [
// '@service_container',
// ],
// ],
// ],
'custom_item.export_controller' => [
'class' => \MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ExportController::class,
'arguments' => [
Expand Down Expand Up @@ -540,7 +540,7 @@
'arguments' => [
'doctrine.orm.entity_manager',
'mautic.custom.model.item',
'mautic.helper.template.formatter',
'mautic.helper.twig.formatter',
],
],
'mautic.custom.model.import.xref.contact' => [
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomField/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function renderFormAction(Request $request): Response
'customField' => $customField,
'form' => $form->createView(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomField:form.html.php',
'contentTemplate' => '@CustomObjects/CustomField/form.html.twig',
'passthroughVars' => [
'mauticContent' => 'customField',
'route' => $route,
Expand Down
4 changes: 2 additions & 2 deletions Controller/CustomField/SaveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function saveAction(Request $request)
'customField' => $customField,
'form' => $form->createView(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomField:form.html.php',
'contentTemplate' => '@CustomObjects/CustomField/form.html.twig',
'passthroughVars' => [
'mauticContent' => 'customField',
'route' => $route,
Expand Down Expand Up @@ -178,7 +178,7 @@ private function buildSuccessForm(CustomObject $customObject, CustomField $custo
);

$template = $this->render(
'CustomObjectsBundle:CustomObject:_form-fields.html.php',
'@CustomObjects/CustomObject/_form-fields.html.twig',
[
'form' => $form->createView(),
'panelId' => $panelId, // Panel id to me replaced if edit
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomItem/BatchDeleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function deleteAction(int $objectId): Response
[
'returnUrl' => $this->routeProvider->buildListRoute($objectId, $page),
'viewParameters' => ['objectId' => $objectId, 'page' => $page],
'contentTemplate' => 'CustomObjectsBundle:CustomItem\List:list',
'contentTemplate' => 'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ListController::listAction',
'passthroughVars' => [
'mauticContent' => 'customItem',
],
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomItem/CancelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function cancelAction(int $objectId, ?int $itemId = null): Response
[
'returnUrl' => $this->routeProvider->buildListRoute($objectId, $page),
'viewParameters' => ['objectId' => $objectId, 'page' => $page],
'contentTemplate' => 'CustomObjectsBundle:CustomItem\List:list',
'contentTemplate' => 'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ListController::listAction',
'passthroughVars' => [
'mauticContent' => 'customItem',
],
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomItem/DeleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function deleteAction(int $objectId, int $itemId): Response
[
'returnUrl' => $this->routeProvider->buildListRoute($objectId, $page),
'viewParameters' => ['objectId' => $objectId, 'page' => $page],
'contentTemplate' => 'CustomObjectsBundle:CustomItem\List:list',
'contentTemplate' => 'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ListController::listAction',
'passthroughVars' => [
'mauticContent' => 'customItem',
],
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomItem/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private function renderFormForItem(CustomItem $customItem, string $route, ?int $
'customObject' => $customItem->getCustomObject(),
'form' => $form->createView(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomItem:form.html.php',
'contentTemplate' => '@CustomObjects/CustomItem/form.html.twig',
'passthroughVars' => [
'mauticContent' => 'customItem',
'route' => $route,
Expand Down
8 changes: 4 additions & 4 deletions Controller/CustomItem/LinkFormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public function formAction(int $itemId, string $entityType, int $entityId): Resp
'customObject' => $relationshipObject,
'form' => $form->createView(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomItem:form.html.php',
'contentTemplate' => '@CustomObjects/CustomItem/form.html.twig',
'passthroughVars' => [
'callback' => 'customItemLinkFormLoad',
'mauticContent' => 'customItem',
Expand All @@ -109,7 +109,7 @@ public function formAction(int $itemId, string $entityType, int $entityId): Resp

$responseData = [
'closeModal' => true,
'flashes' => $this->renderView('MauticCoreBundle:Notification:flash_messages.html.php'),
'flashes' => $this->renderView('@MauticCore/Notification/flash_messages.html.twig'),
];

return new JsonResponse($responseData);
Expand Down Expand Up @@ -152,7 +152,7 @@ public function saveAction(int $itemId, string $entityType, int $entityId): Resp
$responseData = [
'closeModal' => true,
'callback' => $callback,
'flashes' => $this->renderView('MauticCoreBundle:Notification:flash_messages.html.php'),
'flashes' => $this->renderView('@MauticCore/Notification/flash_messages.html.twig'),
];

return new JsonResponse($responseData);
Expand All @@ -170,7 +170,7 @@ public function saveAction(int $itemId, string $entityType, int $entityId): Resp
'form' => $form->createView(),
'tmpl' => $this->request->isXmlHttpRequest() ? $this->request->get('tmpl', 'index') : 'index',
],
'contentTemplate' => 'CustomObjectsBundle:CustomItem:form.html.php',
'contentTemplate' => '@CustomObjects/CustomItem/form.html.twig',
'passthroughVars' => [
'closeModal' => false,
'callback' => 'customItemLinkFormLoad',
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomItem/ListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function listAction(int $objectId, int $page = 1): Response
'sessionVar' => $namespace,
'namespace' => $namespace,
],
'contentTemplate' => 'CustomObjectsBundle:CustomItem:list.html.php',
'contentTemplate' => '@CustomObjects/CustomItem/list.html.twig',
'passthroughVars' => [
'mauticContent' => 'customItem',
'route' => $filterEntityType ? null : $route,
Expand Down
8 changes: 4 additions & 4 deletions Controller/CustomItem/SaveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ public function saveAction(int $objectId, ?int $itemId = null): Response
);

$saveClicked = $form->get('buttons')->get('save')->isClicked();
$detailView = 'CustomObjectsBundle:CustomItem\View:view';
$formView = 'CustomObjectsBundle:CustomItem\Form:edit';
$detailView = 'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ViewController:viewAction';
$formView = 'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\FormController:editAction';

$pathParameters = [
'objectId' => $objectId,
Expand All @@ -178,7 +178,7 @@ public function saveAction(int $objectId, ?int $itemId = null): Response
return $this->redirectToRoute('mautic_contact_action', ['objectAction' => 'view', 'objectId' => $contactId]);
}

$formView = 'CustomObjectsBundle:CustomItem\Form:editWithRedirectToContact';
$formView = 'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\FormController:editWithRedirectToContactAction';
$pathParameters['contactId'] = $contactId;
}

Expand All @@ -203,7 +203,7 @@ public function saveAction(int $objectId, ?int $itemId = null): Response
'form' => $form->createView(),
'tmpl' => $request->isXmlHttpRequest() ? $request->get('tmpl', 'index') : 'index',
],
'contentTemplate' => 'CustomObjectsBundle:CustomItem:form.html.php',
'contentTemplate' => '@CustomObjects/CustomItem/form.html.twig',
'passthroughVars' => [
'mauticContent' => 'customItem',
'route' => $route,
Expand Down
4 changes: 2 additions & 2 deletions Controller/CustomItem/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ public function viewAction(int $objectId, int $itemId): Response
'stats' => $stats,
'logs' => $auditLogs,
'contacts' => $this->forward(
'CustomObjectsBundle:CustomItem\ContactList:list',
'MauticPlugin\CustomObjectsBundle\Controller\CustomItem\ContactListController::listAction',
[
'objectId' => $itemId,
'page' => 1,
'ignoreAjax' => true,
]
)->getContent(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomItem:detail.html.php',
'contentTemplate' => '@CustomObjects/CustomItem/detail.html.twig',
'passthroughVars' => [
'mauticContent' => 'customItem',
'activeLink' => "#mautic_custom_object_{$objectId}",
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomObject/CancelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function cancelAction(?int $objectId): Response
[
'returnUrl' => $this->routeProvider->buildListRoute($page),
'viewParameters' => ['page' => $page],
'contentTemplate' => 'CustomObjectsBundle:CustomObject\List:list',
'contentTemplate' => 'MauticPlugin\CustomObjectsBundle\Controller\CustomObject\ListController:listAction',
'passthroughVars' => [
'mauticContent' => 'customObject',
],
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomObject/DeleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct(

public function deleteAction(int $objectId): Response
{
$controller = 'CustomObjectsBundle:CustomObject\List:list';
$controller = 'MauticPlugin\CustomObjectsBundle\Controller\CustomObject\ListController:listAction';
$page = [
'page' => $this->sessionProviderFactory->createObjectProvider()->getPage(),
];
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomObject/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private function renderForm(CustomObject $customObject, string $route): Response
'deletedFields' => [],
'form' => $form->createView(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomObject:form.html.php',
'contentTemplate' => '@CustomObjects/CustomObject/form.html.twig',
'passthroughVars' => [
'mauticContent' => 'customObject',
'route' => $route,
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomObject/ListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function listAction(int $page = 1): Response
'tmpl' => $request->isXmlHttpRequest() ? $request->get('tmpl', 'index') : 'index',
'sessionVar' => $sessionProvider->getNamespace(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomObject:list.html.php',
'contentTemplate' => '@CustomObjects/CustomObject/list.html.twig',
'passthroughVars' => [
'mauticContent' => 'customObject',
'route' => $route,
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomObject/SaveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function saveAction(?int $objectId = null): Response
'deletedFields' => [],
'form' => $form->createView(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomObject:form.html.php',
'contentTemplate' => '@CustomObjects/CustomObject/form.html.twig',
'passthroughVars' => [
'mauticContent' => 'customObject',
'route' => $objectId ? $this->routeProvider->buildEditRoute($customObject->getId()) : $this->routeProvider->buildNewRoute(),
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomObject/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function viewAction(int $objectId): Response
'stats' => $stats,
'logs' => $auditLogs,
],
'contentTemplate' => 'CustomObjectsBundle:CustomObject:detail.html.php',
'contentTemplate' => '@CustomObjects/CustomObject/detail.html.twig',
'passthroughVars' => [
'mauticContent' => 'customObject',
'activeLink' => "#mautic_custom_object_{$objectId}",
Expand Down
2 changes: 1 addition & 1 deletion Controller/JsonController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class JsonController extends Controller
*/
protected function renderJson(array $responseData = []): JsonResponse
{
$responseData['flashes'] = $this->renderView('MauticCoreBundle:Notification:flash_messages.html.php');
$responseData['flashes'] = $this->renderView('@MauticCore/Notification/flash_messages.html.twig');

return new JsonResponse($responseData);
}
Expand Down
2 changes: 1 addition & 1 deletion EventListener/AssetsSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace MauticPlugin\CustomObjectsBundle\EventListener;

use Mautic\CoreBundle\Templating\Helper\AssetsHelper;
use Mautic\CoreBundle\Twig\Helper\AssetsHelper;
use MauticPlugin\CustomObjectsBundle\Provider\ConfigProvider;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down
2 changes: 1 addition & 1 deletion EventListener/ContactSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private function addLinkTimelineEntry(LeadTimelineEvent $event, string $eventTyp
'icon' => "fa-{$action}",
'extra' => $link,
'contactId' => $link['lead_id'],
'contentTemplate' => 'CustomObjectsBundle:SubscribedEvents\Timeline:link.html.php',
'contentTemplate' => '@CustomObjects/SubscribedEvents/Timeline/link.html.twig',
]);
}
}
Expand Down
10 changes: 5 additions & 5 deletions EventListener/ContactTabSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function injectTabs(CustomContentEvent $event): void
return;
}

if ($event->checkContext('MauticLeadBundle:Lead:lead.html.php', 'tabs')) {
if ($event->checkContext('@MauticLead/Lead/lead.html.twig', 'tabs')) {
$vars = $event->getVars();
$objects = $this->customObjectModel->getMasterCustomObjects();

Expand All @@ -100,13 +100,13 @@ public function injectTabs(CustomContentEvent $event): void
'tabId' => "custom-object-{$object->getId()}",
];

$event->addTemplate('CustomObjectsBundle:SubscribedEvents/Tab:link.html.php', $data);
$event->addTemplate('@CustomObjects/SubscribedEvents/Tab/link.html.twig', $data);
}

$event->addTemplate('CustomObjectsBundle:SubscribedEvents/Tab:modal.html.php');
$event->addTemplate('@CustomObjects/SubscribedEvents/Tab/modal.html.twig');
}

if ($event->checkContext('MauticLeadBundle:Lead:lead.html.php', 'tabs.content')) {
if ($event->checkContext( '@MauticLead/Lead/lead.html.twig','tabs.content')) {
$vars = $event->getVars();
$objects = $this->getCustomObjects();

Expand All @@ -133,7 +133,7 @@ public function injectTabs(CustomContentEvent $event): void
'namespace' => $sessionProvider->getNamespace(),
];

$event->addTemplate('CustomObjectsBundle:SubscribedEvents/Tab:content.html.php', $data);
$event->addTemplate('@CustomObjects/SubscribedEvents/Tab/content.html.twig', $data);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion EventListener/CustomItemButtonSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Mautic\CoreBundle\CoreEvents;
use Mautic\CoreBundle\Event\CustomButtonEvent;
use Mautic\CoreBundle\Templating\Helper\ButtonHelper;
use Mautic\CoreBundle\Twig\Helper\ButtonHelper;
use MauticPlugin\CustomObjectsBundle\Entity\CustomItem;
use MauticPlugin\CustomObjectsBundle\Exception\ForbiddenException;
use MauticPlugin\CustomObjectsBundle\Provider\CustomItemPermissionProvider;
Expand Down
Loading