Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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 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' => 'CustomObjectsBundle: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' => 'CustomObjectsBundle: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',
'CustomObjectsBundle: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/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' => 'CustomObjectsBundle: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' => 'CustomObjectsBundle: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('MauticCoreBundle: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('MauticCoreBundle: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' => 'CustomObjectsBundle: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' => 'CustomObjectsBundle:CustomItem:list.html.twig',
'passthroughVars' => [
'mauticContent' => 'customItem',
'route' => $filterEntityType ? null : $route,
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomItem/SaveController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => 'CustomObjectsBundle:CustomItem:form.html.twig',
'passthroughVars' => [
'mauticContent' => 'customItem',
'route' => $route,
Expand Down
2 changes: 1 addition & 1 deletion Controller/CustomItem/ViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function viewAction(int $objectId, int $itemId): Response
]
)->getContent(),
],
'contentTemplate' => 'CustomObjectsBundle:CustomItem:detail.html.php',
'contentTemplate' => 'CustomObjectsBundle:CustomItem:detail.html.twig',
'passthroughVars' => [
'mauticContent' => 'customItem',
'activeLink' => "#mautic_custom_object_{$objectId}",
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' => 'CustomObjectsBundle: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' => 'CustomObjectsBundle: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' => 'CustomObjectsBundle: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' => 'CustomObjectsBundle: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('MauticCoreBundle:Notification:flash_messages.html.twig');

return new JsonResponse($responseData);
}
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' => 'CustomObjectsBundle: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('MauticLeadBundle: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('CustomObjectsBundle:SubscribedEvents/Tab:link.html.twig', $data);
}

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

if ($event->checkContext('MauticLeadBundle:Lead:lead.html.php', 'tabs.content')) {
if ($event->checkContext('MauticLeadBundle: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('CustomObjectsBundle:SubscribedEvents/Tab:content.html.twig', $data);
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions EventListener/CustomItemTabSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static function getSubscribedEvents(): array

public function injectTabs(CustomContentEvent $event): void
{
if ($event->checkContext('CustomObjectsBundle:CustomItem:detail.html.php', 'tabs')) {
if ($event->checkContext('CustomObjectsBundle:CustomItem:detail.html.twig', 'tabs')) {
$vars = $event->getVars();
$objects = $this->customObjectModel->getMasterCustomObjects();

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

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

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

if ($event->checkContext('CustomObjectsBundle:CustomItem:detail.html.php', 'tabs.content')) {
if ($event->checkContext('CustomObjectsBundle:CustomItem:detail.html.twig', 'tabs.content')) {
$vars = $event->getVars();
$objects = $this->getCustomObjects();

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

$event->addTemplate('CustomObjectsBundle:SubscribedEvents/Tab:content.html.php', $data);
$event->addTemplate('CustomObjectsBundle:SubscribedEvents/Tab:content.html.twig', $data);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/Unit/EventListener/ContactSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function testPluginEnabledOnPublicPageWhenItemFound(): void
'id' => 444,
],
'contactId' => 333,
'contentTemplate' => 'CustomObjectsBundle:SubscribedEvents\Timeline:link.html.php',
'contentTemplate' => 'CustomObjectsBundle:SubscribedEvents\Timeline:link.html.twig',
]);

$this->subscriber->onTimelineGenerate($this->leadTimelineEvent);
Expand Down Expand Up @@ -273,7 +273,7 @@ public function testPluginEnabledOnPublicPageWhenItemNotFound(): void
'id' => 444,
],
'contactId' => 333,
'contentTemplate' => 'CustomObjectsBundle:SubscribedEvents\Timeline:link.html.php',
'contentTemplate' => 'CustomObjectsBundle:SubscribedEvents\Timeline:link.html.twig',
]);

$this->subscriber->onTimelineGenerate($this->leadTimelineEvent);
Expand Down
14 changes: 7 additions & 7 deletions Tests/Unit/EventListener/ContactTabSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ public function testForTabsContext(): void
->method('checkContext')
->willReturnMap(
[
['MauticLeadBundle:Lead:lead.html.php', 'tabs', true],
['MauticLeadBundle:Lead:lead.html.php', 'tabs.content', false],
['MauticLeadBundle:Lead:lead.html.twig', 'tabs', true],
['MauticLeadBundle:Lead:lead.html.twig', 'tabs.content', false],
]
);

Expand All @@ -136,15 +136,15 @@ public function testForTabsContext(): void
->method('addTemplate')
->withConsecutive(
[
'CustomObjectsBundle:SubscribedEvents/Tab:link.html.php',
'CustomObjectsBundle:SubscribedEvents/Tab:link.html.twig',
[
'count' => 13,
'title' => 'Object A',
'tabId' => 'custom-object-555',
],
],
[
'CustomObjectsBundle:SubscribedEvents/Tab:modal.html.php',
'CustomObjectsBundle:SubscribedEvents/Tab:modal.html.twig',
]
);

Expand Down Expand Up @@ -176,8 +176,8 @@ public function testForTabContentsContext(): void
->method('checkContext')
->willReturnMap(
[
['MauticLeadBundle:Lead:lead.html.php', 'tabs', false],
['MauticLeadBundle:Lead:lead.html.php', 'tabs.content', true],
['MauticLeadBundle:Lead:lead.html.twig', 'tabs', false],
['MauticLeadBundle:Lead:lead.html.twig', 'tabs.content', true],
]
);

Expand Down Expand Up @@ -218,7 +218,7 @@ public function testForTabContentsContext(): void
$this->customContentEvent->expects($this->once())
->method('addTemplate')
->with(
'CustomObjectsBundle:SubscribedEvents/Tab:content.html.php',
'CustomObjectsBundle:SubscribedEvents/Tab:content.html.twig',
[
'customObjectId' => 555,
'currentEntityId' => 45,
Expand Down
20 changes: 10 additions & 10 deletions Tests/Unit/EventListener/CustomItemTabSubscriberTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public function testForTabsContext(): void
$this->customContentEvent
->method('checkContext')
->withConsecutive(
['CustomObjectsBundle:CustomItem:detail.html.php', 'tabs'],
['CustomObjectsBundle:CustomItem:detail.html.php', 'tabs.content']
['CustomObjectsBundle:CustomItem:detail.html.twig', 'tabs'],
['CustomObjectsBundle:CustomItem:detail.html.twig', 'tabs.content']
)
->willReturnOnConsecutiveCalls(true, false);

Expand All @@ -118,15 +118,15 @@ public function testForTabsContext(): void
->method('addTemplate')
->withConsecutive(
[
'CustomObjectsBundle:SubscribedEvents/Tab:link.html.php',
'CustomObjectsBundle:SubscribedEvents/Tab:link.html.twig',
[
'count' => 13,
'title' => 'Object A',
'tabId' => 'custom-object-555',
],
],
[
'CustomObjectsBundle:SubscribedEvents/Tab:modal.html.php',
'CustomObjectsBundle:SubscribedEvents/Tab:modal.html.twig',
]
);

Expand Down Expand Up @@ -158,8 +158,8 @@ public function testForTabsContextWhenTheCustomItemMatchesCustomObject(): void
$this->customContentEvent
->method('checkContext')
->withConsecutive(
['CustomObjectsBundle:CustomItem:detail.html.php', 'tabs'],
['CustomObjectsBundle:CustomItem:detail.html.php', 'tabs.content']
['CustomObjectsBundle:CustomItem:detail.html.twig', 'tabs'],
['CustomObjectsBundle:CustomItem:detail.html.twig', 'tabs.content']
)
->willReturn(true, false);

Expand All @@ -169,7 +169,7 @@ public function testForTabsContextWhenTheCustomItemMatchesCustomObject(): void

$this->customContentEvent->expects($this->once())
->method('addTemplate')
->with('CustomObjectsBundle:SubscribedEvents/Tab:modal.html.php');
->with('CustomObjectsBundle:SubscribedEvents/Tab:modal.html.twig');

$this->customObjectModel->expects($this->once())
->method('getMasterCustomObjects')
Expand All @@ -194,8 +194,8 @@ public function testForTabContentsContext(): void
$this->customContentEvent
->method('checkContext')
->withConsecutive(
['CustomObjectsBundle:CustomItem:detail.html.php', 'tabs'],
['CustomObjectsBundle:CustomItem:detail.html.php', 'tabs.content']
['CustomObjectsBundle:CustomItem:detail.html.twig', 'tabs'],
['CustomObjectsBundle:CustomItem:detail.html.twig', 'tabs.content']
)
->willReturn(false, true);

Expand Down Expand Up @@ -236,7 +236,7 @@ public function testForTabContentsContext(): void
$this->customContentEvent->expects($this->once())
->method('addTemplate')
->with(
'CustomObjectsBundle:SubscribedEvents/Tab:content.html.php',
'CustomObjectsBundle:SubscribedEvents/Tab:content.html.twig',
[
'customObjectId' => 555,
'currentEntityId' => 45,
Expand Down
25 changes: 25 additions & 0 deletions Views/CustomField/_detail_left_section.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!-- left section -->
<div class="col-md-9 bg-white height-auto">
<div class="bg-auto">
<!-- page detail header -->
<div class="pr-md pl-md pt-lg pb-lg">
<div class="box-layout">
<div class="col-xs-10">
<div class="text-muted">{{ item.type }}</div>
</div>
<div class="col-xs-2 text-right">
{{ include('MauticCoreBundle:Helper:publishstatus_badge.html.twig', {
entity: item
}) }}
</div>
</div>
</div>
<!--/ page detail header -->
</div>
<div class="pa-md">
<div class="row">
<div class="col-md-12">
</div>
</div>
</div>
</div>
Loading