/**
  * Handle the build widget event.
  *
  * @param BuildWidgetEvent $event The event.
  *
  * @return void
  */
 public static function handleEvent(BuildWidgetEvent $event)
 {
     $widget = $event->getWidget();
     if (!$widget instanceof Widget) {
         return;
     }
     $widget->wizard .= self::getWizard($event->getProperty(), $event->getEnvironment());
 }
Esempio n. 2
0
 /**
  * Handle the build widget event.
  *
  * @param BuildWidgetEvent $event The event.
  *
  * @return void
  */
 public static function handleEvent(BuildWidgetEvent $event)
 {
     if ($event->getWidget() || TL_MODE !== 'BE') {
         return;
     }
     $builder = new static($event->getEnvironment());
     $widget = $builder->buildWidget($event->getProperty(), $event->getModel());
     $event->setWidget($widget);
 }
 /**
  * Update the wizard HTML string in the widget.
  *
  * @param BuildWidgetEvent $event The event being emitted.
  *
  * @param string           $value The HTML for the wizard of the widget.
  *
  * @return void
  */
 public function update($event, $value)
 {
     $event->getWidget()->xlabel .= $value;
 }
 /**
  * Update the wizard HTML string in the widget.
  *
  * @param BuildWidgetEvent $event The event being emitted.
  *
  * @param string           $value The HTML for the wizard of the widget.
  *
  * @return void
  */
 public function update($event, $value)
 {
     $event->getWidget()->wizard = $value;
 }