content_workflow_bynder-1.0.0/content_workflow_bynder_upload/src/Event/PreNodeUploadEvent.php

content_workflow_bynder_upload/src/Event/PreNodeUploadEvent.php
<?php

namespace Drupal\content_workflow_bynder_upload\Event;

use Symfony\Contracts\EventDispatcher\Event;
use Drupal\Core\Entity\EntityInterface;

/**
 * Wraps a pre node upload event for event listeners.
 */
class PreNodeUploadEvent extends Event {

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

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

  /**
   * Constructs a pre node upload event object.
   *
   * @param \Drupal\Core\Entity\EntityInterface $node
   *   Entity object.
   * @param array $content_workflow_values
   *   Source fields representing object in ContentWorkflowBynder.
   */
  public function __construct(EntityInterface $node, array $content_workflow_values) {
    $this->node = $node;
    $this->contentWorkflowValues = $content_workflow_values;
  }

  /**
   * 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->contentWorkflowValues;
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc