/**
  * Renders an event once.
  *
  * @param \Ivory\GoogleMap\Events\Event $eventOnce The event once.
  *
  * @return string The JS output.
  */
 public function renderEventOnce(Event $eventOnce)
 {
     return sprintf('%s = google.maps.event.addListenerOnce(%s, "%s", %s);' . PHP_EOL, $eventOnce->getJavascriptVariable(), $eventOnce->getInstance(), $eventOnce->getEventName(), $eventOnce->getHandle());
 }
Example #2
0
 public function testEventNameWithValidValue()
 {
     $this->event->setEventName('foo');
     $this->assertSame('foo', $this->event->getEventName());
 }