tome-8.x-1.x-dev/modules/tome_sync/src/Event/ContentCrudEvent.php

modules/tome_sync/src/Event/ContentCrudEvent.php
<?php

namespace Drupal\tome_sync\Event;

use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Component\EventDispatcher\Event;

/**
 * Wraps a content event for listeners.
 */
class ContentCrudEvent extends Event {

  /**
   * Content object.
   *
   * @var \Drupal\Core\Entity\ContentEntityInterface
   */
  protected $content;

  /**
   * Constructs a CollectPathsEvent object.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $content
   *   Content object.
   */
  public function __construct(ContentEntityInterface $content) {
    $this->content = $content;
  }

  /**
   * Gets the content object.
   *
   * @return \Drupal\Core\Entity\ContentEntityInterface
   *   The content object that caused the event to fire.
   */
  public function getContent() {
    return $this->content;
  }

}

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

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