Esempio n. 1
0
 /**
  * Register all listeners to handle creation of a data container.
  *
  * @return void
  */
 protected function registerEventsInDispatcher()
 {
     $serviceContainer = $this->getServiceContainer();
     $this->addListener(GetBreadcrumbEvent::NAME, function (GetBreadcrumbEvent $event) use($serviceContainer) {
         if ($event->getEnvironment()->getDataDefinition()->getName() !== 'tl_metamodel_dca') {
             return;
         }
         $subscriber = new BreadCrumbInputScreens($serviceContainer);
         $subscriber->getBreadcrumb($event);
     })->addListener(BuildDataDefinitionEvent::NAME, array($this, 'setParentTableVisibility'))->addListener(ModelToLabelEvent::NAME, array($this, 'modelToLabel'))->addListener(ManipulateWidgetEvent::NAME, array($this, 'getPanelLayoutWizard'))->addListener(GetPropertyOptionsEvent::NAME, array($this, 'getBackendSections'))->addListener(GetPropertyOptionsEvent::NAME, array($this, 'getParentTables'))->addListener(GetPropertyOptionsEvent::NAME, array($this, 'getRenderTypes'))->addListener(GetPropertyOptionsEvent::NAME, array($this, 'getRenderModes'));
 }
 /**
  * {@inheritDoc}
  */
 public function getBreadcrumbElements(EnvironmentInterface $environment, $elements)
 {
     if (!isset($this->inputScreenId)) {
         $this->inputScreenId = $this->extractIdFrom($environment, 'pid');
     }
     $elements = parent::getBreadcrumbElements($environment, $elements);
     $elements[] = array('url' => $this->generateUrl('tl_metamodel_dca_sortgroup', $this->seralizeId('tl_metamodel_dca', $this->inputScreenId)), 'text' => sprintf($this->getBreadcrumbLabel($environment, 'tl_metamodel_dca_sortgroup'), $this->getInputScreen()->name), 'icon' => $this->getBaseUrl() . '/system/modules/metamodels/assets/images/icons/dca_groupsortsettings.png');
     return $elements;
 }