You are here

class PostNodeSaveEvent in GatherContent 8.3

Same name and namespace in other branches
  1. 8.4 src/Event/PostNodeSaveEvent.php \Drupal\gathercontent\Event\PostNodeSaveEvent

Wraps a post node save event for event listeners.

Hierarchy

  • class \Drupal\gathercontent\Event\PostNodeSaveEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of PostNodeSaveEvent

1 file declares its use of PostNodeSaveEvent
gathercontent.module in ./gathercontent.module
Main module file for GatherContent module.

File

src/Event/PostNodeSaveEvent.php, line 11

Namespace

Drupal\gathercontent\Event
View source
class PostNodeSaveEvent extends Event {

  /**
   * Node object.
   *
   * @var \Drupal\node\NodeInterface
   */
  protected $node;

  /**
   * Source fields.
   *
   * @var object
   */
  protected $sourceValues;

  /**
   * Files fetched from GatherContent.
   *
   * @var array
   */
  protected $files;

  /**
   * Constructs a post node save event object.
   *
   * @param \Drupal\node\NodeInterface $node
   *   Map plugin.
   * @param object $sourceValues
   *   Source fields representing object in GatherContent.
   * @param array $files
   *   Array of files fetched from GatherContent.
   */
  public function __construct(NodeInterface $node, $sourceValues, array $files) {
    $this->node = $node;
    $this->sourceValues = $sourceValues;
    $this->files = $files;
  }

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

  /**
   * Gets the object of source fields.
   *
   * @return object
   *   Source fields.
   */
  public function getSourceValues() {
    return $this->sourceValues;
  }

  /**
   * Gets the array of source files.
   *
   * @return array
   *   Source files.
   */
  public function getFiles() {
    return $this->files;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PostNodeSaveEvent::$files protected property Files fetched from GatherContent.
PostNodeSaveEvent::$node protected property Node object.
PostNodeSaveEvent::$sourceValues protected property Source fields.
PostNodeSaveEvent::getFiles public function Gets the array of source files.
PostNodeSaveEvent::getNode public function Gets the node object.
PostNodeSaveEvent::getSourceValues public function Gets the object of source fields.
PostNodeSaveEvent::__construct public function Constructs a post node save event object.