예제 #1
0
 /**
  * @param CentreonEngine\Events\GetMacroHost $event
  */
 public static function execute(MacroHostEvent $event)
 {
     /* Macros for Host */
     $hosts = array_keys(HostRepository::getHostsByPollerId($event->getPollerId()));
     foreach ($hosts as $hostId) {
         $arrCustomMacro = CustomMacroRepository::loadHostCustomMacro($hostId);
         foreach ($arrCustomMacro as $customMacro) {
             $event->setMacro($hostId, $customMacro['macro_name'], $customMacro['macro_value']);
         }
     }
 }