/** * * @param \CentreonConfiguration\Events\BrokerFormSave $event */ public static function execute(BrokerPollerConfEvent $event) { $event->addValues(BrokerRepository::loadValues($event->getPollerId())); }
/** * Generate form for a template * * @param int $pollerId The poller id for load the value in edition * @return array */ public function genForm($pollerId = null) { $values = array(); if (!is_null($pollerId)) { $events = Di::getDefault()->get('events'); $eventParams = new BrokerPollerConfEvent($pollerId, $values); $events->emit('centreon-configuration.broker.poller.conf', array($eventParams)); $values = $eventParams->getValues(); } return $this->loadSteps($values); }