PHP code example of thelia / backoffice-default-twig-template
1. Go to this page and download the library: Download thelia/backoffice-default-twig-template library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
thelia / backoffice-default-twig-template example snippets
public static function getSubscribedHooks(): array
{
return ['customer.tab' => [['type' => 'back', 'method' => 'onCustomerTab']]];
}
public function onCustomerTab(HookRenderBlockEvent $event): void
{
$event->add([
'id' => 'my-notes',
'title' => $this->trans('Notes', [], MyModule::DOMAIN_NAME),
'href' => '/admin/module/MyModule/customer-notes?customer_id='.(int) $event->getArgument('customer_id'),
]);
}