You are here

class FlippyEvent in Flippy 8

Defines a Flippy Node event.

Hierarchy

  • class \Drupal\flippy\FlippyEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of FlippyEvent

1 string reference to 'FlippyEvent'
flippy.services.yml in ./flippy.services.yml
flippy.services.yml
1 service uses FlippyEvent
flippy.event in ./flippy.services.yml
Drupal\flippy\FlippyEvent

File

src/FlippyEvent.php, line 11

Namespace

Drupal\flippy
View source
class FlippyEvent extends Event {
  protected $queries;
  protected $node;

  /**
   * FlippyEvent constructor.
   *
   * @param array $queries
   *   The queries for this event.
   * @param \Drupal\node\NodeInterface $node
   *   The node object.
   */
  public function __construct(array $queries, NodeInterface $node) {
    $this->queries = $queries;
    $this->node = $node;
  }

  /**
   * Getter for query array.
   *
   * @return array
   *   The queries for this event.
   */
  public function getQueries() {
    return $this->queries;
  }

  /**
   * Setter for query array.
   *
   * @param array $queries
   *   The queries for this event.
   */
  public function setQueries(array $queries) {
    $this->queries = $queries;
  }

  /**
   * Getter for node.
   *
   * @return \Drupal\node\NodeInterface
   *   The node object for this event.
   */
  public function getNode() {
    return $this->node;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FlippyEvent::$node protected property
FlippyEvent::$queries protected property
FlippyEvent::getNode public function Getter for node.
FlippyEvent::getQueries public function Getter for query array.
FlippyEvent::setQueries public function Setter for query array.
FlippyEvent::__construct public function FlippyEvent constructor.