Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function configureOptions(OptionsInterface $options)
 {
     $eventHandlers = $options->getEventHandlers();
     $eventHandlers->add(new LoadEventHandler(['function' => $this->getJavascriptFunctionName('load'), 'route' => $this->getActionUrl('grid')]));
     $eventHandlers->add(new ClickRowEventHandler(['function' => $this->getJavascriptFunctionName('click'), 'route' => $this->getActionUrl('edit')]));
     $eventHandlers->add(new CustomRowEventHandler(['function' => $this->getJavascriptFunctionName('install'), 'function_name' => 'installPackage', 'row_action' => 'action_installPackage']));
     $eventHandlers->add(new CustomRowEventHandler(['function' => $this->getJavascriptFunctionName('update'), 'function_name' => 'updatePackage', 'row_action' => 'action_updatePackage']));
     $eventHandlers->add(new CustomRowEventHandler(['function' => $this->getJavascriptFunctionName('remove'), 'function_name' => 'removePackage', 'row_action' => 'action_removePackage']));
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 protected function configureOptions(OptionsInterface $options)
 {
     $eventHandlers = $options->getEventHandlers();
     $eventHandlers->add(new LoadEventHandler(['function' => $this->getJavascriptFunctionName('load'), 'route' => $this->getActionUrl('grid')]));
     $eventHandlers->add(new DeleteRowEventHandler(['function' => $this->getJavascriptFunctionName('delete'), 'row_action' => DataGridInterface::ACTION_DELETE, 'route' => $this->getActionUrl('delete')]));
     $eventHandlers = $options->getEventHandlers();
     $eventHandlers->add(new ProcessEventHandler(['function' => $this->getJavascriptFunctionName('process')]));
     $eventHandlers->add(new LoadedEventHandler(['function' => $this->getJavascriptFunctionName('data_loaded')]));
 }
Ejemplo n.º 3
0
 /**
  * Configures DataGrid options
  *
  * @param OptionsInterface $options
  *
  * @return void
  */
 protected function configureOptions(OptionsInterface $options)
 {
     $eventHandlers = $options->getEventHandlers();
     $eventHandlers->add(new LoadEventHandler(['function' => $this->getJavascriptFunctionName('load'), 'route' => $this->getActionUrl('grid')]));
     $eventHandlers->add(new EditRowEventHandler(['function' => $this->getJavascriptFunctionName('edit'), 'row_action' => DataGridInterface::ACTION_EDIT, 'route' => $this->getActionUrl('edit')]));
     $eventHandlers->add(new ClickRowEventHandler(['function' => $this->getJavascriptFunctionName('click'), 'route' => $this->getActionUrl('edit')]));
     $eventHandlers->add(new DeleteRowEventHandler(['function' => $this->getJavascriptFunctionName('delete'), 'row_action' => DataGridInterface::ACTION_DELETE, 'route' => $this->getActionUrl('delete')]));
 }