media_mpx-8.x-1.x-dev/src/Notification.php

src/Notification.php
<?php

namespace Drupal\media_mpx;

use Drupal\media\MediaTypeInterface;
use Lullabot\Mpx\DataService\Notification as MpxNotification;

/**
 * Wrap an mpx notification to include an associated media type.
 */
class Notification {

  /**
   * The mpx notification.
   *
   * @var \Lullabot\Mpx\DataService\Notification
   */
  protected $notification;

  /**
   * The media type associated with the notification.
   *
   * @var \Drupal\media\MediaTypeInterface
   */
  protected $mediaType;

  /**
   * Notification constructor.
   *
   * @param \Lullabot\Mpx\DataService\Notification $notification
   *   The mpx notification.
   * @param \Drupal\media\MediaTypeInterface $media_type
   *   The media type associated with the notification.
   */
  public function __construct(MpxNotification $notification, MediaTypeInterface $media_type) {
    $this->notification = $notification;
    $this->mediaType = $media_type;
  }

  /**
   * Return the mpx notification.
   *
   * @return \Lullabot\Mpx\DataService\Notification
   *   The mpx notification.
   */
  public function getNotification(): MpxNotification {
    return $this->notification;
  }

  /**
   * Return the media type.
   *
   * @return \Drupal\media\MediaTypeInterface
   *   The media type.
   */
  public function getMediaType(): MediaTypeInterface {
    return $this->mediaType;
  }

}

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

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