Exemplo n.º 1
0
 public function onDealerEditTab(HookRenderBlockEvent $event)
 {
     if ($this->checkAuth(DealerTeam::RESOURCES_TEAM, [], AccessManager::VIEW)) {
         $lang = $this->getSession()->getLang();
         $event->add(["id" => "dealerteam", "class" => "", "title" => $this->transQuick("Team", $lang->getLocale()), "content" => $this->render("dealerteam.html", $event->getArguments())]);
     }
 }
Exemplo n.º 2
0
 public function onMainFooterBody(HookRenderBlockEvent $event)
 {
     $content = trim($this->render("main-footer-body.html"));
     if ("" != $content) {
         $event->add(array("id" => "contact-footer-body", "class" => "contact", "title" => $this->trans("Contact", array(), "hookcontact"), "content" => $content));
     }
 }
Exemplo n.º 3
0
 public function onMainTopMenuTools(HookRenderBlockEvent $event)
 {
     $isGranted = $this->securityContext->isGranted(["ADMIN"], [], [BoSearch::getModuleCode()], [AccessManager::VIEW]);
     if ($isGranted) {
         $event->add(['title' => $this->trans('Search product', [], BoSearch::DOMAIN_NAME), 'url' => $this->router->generate('bosearch.product.view')]);
     }
 }
Exemplo n.º 4
0
 public function onMainFooterBody(HookRenderBlockEvent $event)
 {
     $content = trim($this->render("main-footer-body.html"));
     if ("" != $content) {
         $event->add(array("id" => "navigation-footer-body", "class" => "links", "title" => $this->trans("Latest articles", array(), "hooknavigation"), "content" => $content));
     }
 }
Exemplo n.º 5
0
 public function onMainFooterBody(HookRenderBlockEvent $event)
 {
     $content = trim($this->render("main-footer-body.html"));
     if ("" != $content) {
         $event->add(array("id" => "links-footer-body", "class" => "default", "title" => $this->trans("Useful links", array(), "hooklinks.fo.default"), "content" => $content));
     }
 }
Exemplo n.º 6
0
 public function blockTheliaInformation(HookRenderBlockEvent $event)
 {
     $content = trim($this->render("block-thelia-information.html"));
     if (!empty($content)) {
         $event->add(["id" => "block-thelia-information", "title" => $this->trans("Thelia informations", [], HookAdminHome::DOMAIN_NAME), "content" => $content]);
     }
 }
Exemplo n.º 7
0
 public function onMainFooterBody(HookRenderBlockEvent $event)
 {
     $content = trim($this->render("main-footer-body.html"));
     if ("" != $content) {
         $event->add(array("id" => "social-footer-body", "class" => "social", "title" => $this->trans("Follow us", array(), "hooksocial.fo.default"), "content" => $content));
     }
 }
Exemplo n.º 8
0
 public function onMainFooterBody(HookRenderBlockEvent $event)
 {
     $bodyConfig = HookNavigation::getConfigValue(HookNavigationConfigValue::FOOTER_BODY_FOLDER_ID);
     $content = trim($this->render('main-footer-body.html', ['bodyFolderId' => $bodyConfig]));
     if ('' != $content) {
         $event->add(array('id' => 'navigation-footer-body', 'class' => 'links', 'title' => $this->trans('Latest articles', array(), HookNavigation::MESSAGE_DOMAIN), 'content' => $content));
     }
 }
Exemplo n.º 9
0
 /**
  * Insert the legacy product attributes configuration tab.
  *
  * @param HookRenderBlockEvent $event
  */
 public function onProductTab(HookRenderBlockEvent $event)
 {
     $product = ProductQuery::create()->findPk($event->getArgument('id'));
     $productCheckEvent = new ProductCheckEvent($this->getRequest()->getProductId());
     $this->dispatcher->dispatch(LegacyProductAttributesEvents::PRODUCT_CHECK_LEGACY_ATTRIBUTES_APPLY, $productCheckEvent);
     if (!$productCheckEvent->getResult()) {
         $content = $this->render('product-edit-tab-legacy-product-attributes-does-not-apply.html');
     } elseif ($product->getTemplate() === null) {
         $content = $this->render('product-edit-tab-legacy-product-attributes-no-template.html');
     } else {
         $content = $this->render('product-edit-tab-legacy-product-attributes.html');
     }
     $event->add(['id' => 'legacy-product-attributes', 'title' => Translator::getInstance()->trans('Attributes configuration', [], LegacyProductAttributes::MESSAGE_DOMAIN_BO), 'content' => $content]);
 }
 public function onAccountAdditional(HookRenderBlockEvent $event)
 {
     $customer = $this->getCustomer();
     if (is_null($customer)) {
         // No customer => nothing to do.
         return;
     }
     $customerId = $customer->getId();
     if ($customerId <= 0) {
         // Wrong customer => return.
         return;
     }
     $title = $this->trans('My customer family', [], CustomerFamily::MESSAGE_DOMAIN);
     $event->add(array('id' => $customerId, 'title' => $title, 'content' => $this->render('account-additional.html', array('customerId' => $customerId, 'messageDomain' => CustomerFamily::MESSAGE_DOMAIN, 'particular' => CustomerFamily::CUSTOMER_FAMILY_PARTICULAR, 'title' => $title))));
 }
Exemplo n.º 11
0
 public function onMainTopMenuTools(HookRenderBlockEvent $event)
 {
     $event->add(["title" => $this->trans("Edit stylesheet", [], BackOfficeCss::MESSAGE_DOMAIN), "url" => URL::getInstance()->absoluteUrl("/admin/module/BackOfficeCss")]);
 }
Exemplo n.º 12
0
 /**
  * Add a new entry in the admin tools menu
  *
  * should add to event a fragment with fields : id,class,url,title
  *
  * @param HookRenderBlockEvent $event
  */
 public function onMainTopMenuTools(HookRenderBlockEvent $event)
 {
     $event->add(['id' => 'tools_menu_carousel', 'class' => '', 'url' => URL::getInstance()->absoluteUrl('/admin/module/Carousel'), 'title' => $this->trans('Edit your carousel', [], Carousel::DOMAIN_NAME)]);
 }
Exemplo n.º 13
0
 public function onMainTopMenuTools(HookRenderBlockEvent $event)
 {
     $event->add(array('url' => URL::getInstance()->absoluteUrl('/admin/module/Diaporamas/diaporama'), 'title' => Translator::getInstance()->trans('diaporama.menu_title', array(), Diaporamas::BO_MESSAGE_DOMAIN)));
 }
Exemplo n.º 14
0
 public function testBlock(HookRenderBlockEvent $event)
 {
     $event->add(['id' => '1', 'content' => $this->render('test-block.html.twig')])->add(['id' => '2', 'class' => 'class2', 'content' => $this->render('test-block.html.twig', ["myVar" => "content 2"]), 'other' => 'other variable']);
 }
Exemplo n.º 15
0
 public function onMainFooterBody(HookRenderBlockEvent $event)
 {
     $event->addFragment(new Fragment(array("id" => "id1", "class" => "class1", "content" => "content1")));
     $event->add(array("id" => "id2", "class" => "class2", "content" => "content2"));
 }
 /**
  * Insert a link to the ACL configuration page in the tool menu.
  * @param HookRenderBlockEvent $event Render event.
  */
 public function customerGroupAclHookTool(HookRenderBlockEvent $event)
 {
     $event->add(["url" => URL::getInstance()->absoluteUrl("/admin/module/CustomerGroupAcl"), "title" => $this->trans("Customer Group Acl", [], CustomerGroupAcl::DOMAIN_MESSAGE)]);
 }
Exemplo n.º 17
0
 public function onMainTopMenuTools(HookRenderBlockEvent $event)
 {
     $event->add(array("url" => URL::getInstance()->absoluteUrl("/admin/module/GoogleShopping?current_tab=management"), "title" => $this->trans("Google catalog management", [], GoogleShopping::DOMAIN_NAME)));
 }
Exemplo n.º 18
0
 /**
  * Add a new entry in the admin tools menu
  *
  * should add to event a fragment with fields : id,class,url,title
  *
  * @param HookRenderBlockEvent $event
  */
 public function onMainTopMenuTools(HookRenderBlockEvent $event)
 {
     $event->add(['id' => 'tools_menu_comment', 'class' => '', 'url' => URL::getInstance()->absoluteUrl('/admin/module/comments'), 'title' => $this->trans('Comments', [], Comment::MESSAGE_DOMAIN)]);
 }
Exemplo n.º 19
0
 /**
  * Add a link to the pop-in configuration page in the tools menu.
  * @param HookRenderBlockEvent $event
  */
 public function onMainTopMenuTools(HookRenderBlockEvent $event)
 {
     $event->add(['title' => $this->trans('Pop-in campaigns', [], PopIn::MESSAGE_DOMAIN_BO), 'url' => $this->router->generate('popin.config')]);
 }
Exemplo n.º 20
0
 public function onMainTopMenuTools(HookRenderBlockEvent $event)
 {
     $event->add(['id' => 'top-menu-tools-tntfrance', 'class' => '', 'url' => URL::getInstance()->absoluteUrl('/admin/module/TNTFrance/orders'), 'title' => $this->trans('TNT Orders', [], TNTFrance::MESSAGE_DOMAIN)]);
 }
 public function onMainTopMenuToolsContents(HookRenderBlockEvent $event)
 {
     $event->add(array("id" => "menuTools", "class" => '', "url" => URL::getInstance()->absoluteUrl('/admin/modules/menu/gestion'), "title" => $this->trans("Menu")));
 }