You are here

class PreNodeUploadEvent in GatherContent 8.3

Wraps a pre node upload event for event listeners.

Hierarchy

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

Expanded class hierarchy of PreNodeUploadEvent

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

File

src/Event/PreNodeUploadEvent.php, line 11

Namespace

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

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

  /**
   * Source fields.
   *
   * @var array
   */
  protected $gathercontentValues;

  /**
   * Constructs a pre node upload event object.
   *
   * @param \Drupal\node\NodeInterface $node
   *   Map plugin.
   * @param array $gathercontentValues
   *   Source fields representing object in GatherContent.
   */
  public function __construct(NodeInterface $node, array $gathercontentValues) {
    $this->node = $node;
    $this->gathercontentValues = $gathercontentValues;
  }

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

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

}

Members

Namesort descending Modifiers Type Description Overrides
PreNodeUploadEvent::$gathercontentValues protected property Source fields.
PreNodeUploadEvent::$node protected property Node object.
PreNodeUploadEvent::getGathercontentValues public function Gets the array of source fields.
PreNodeUploadEvent::getNode public function Gets the node object.
PreNodeUploadEvent::__construct public function Constructs a pre node upload event object.