Skip to content

Instantly share code, notes, and snippets.

@rakeshjames
Last active July 15, 2016 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rakeshjames/e84bb25e6dad79d4ad6538ad159be3da to your computer and use it in GitHub Desktop.
Save rakeshjames/e84bb25e6dad79d4ad6538ad159be3da to your computer and use it in GitHub Desktop.
<?php
namespace Drupal\example_events;
use Symfony\Component\EventDispatcher\Event;
class ExampleEvent extends Event {
const SUBMIT = 'event.submit';
protected $referenceID;
public function __construct($referenceID)
{
$this->referenceID = $referenceID;
}
public function getReferenceID()
{
return $this->referenceID;
}
public function myEventDescription() {
return "This is as an example event";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment