Ejemplo n.º 1
0
 /**
  * Clear the button if the User is not admin.
  *
  * @param GetOperationButtonEvent $event The event.
  *
  * @return void
  */
 public function getOperationButton(GetOperationButtonEvent $event)
 {
     if ($event->getEnvironment()->getDataDefinition()->getName() !== 'tl_metamodel') {
         return;
     }
     $command = $event->getCommand();
     if ($command->getName() == 'dca_combine') {
         $event->setHref(UrlBuilder::fromUrl($event->getHref())->setQueryParameter('id', ModelId::fromValues('tl_metamodel_dca_combine', $event->getModel()->getId())->getSerialized())->getUrl());
     }
 }