headless_cms-1.0.3/modules/headless_cms_notify/src/NotifyMessage/HeadlessNotifyMessageInterface.php

modules/headless_cms_notify/src/NotifyMessage/HeadlessNotifyMessageInterface.php
<?php

declare(strict_types=1);

namespace Drupal\headless_cms_notify\NotifyMessage;

/**
 * Defines an interface for a headless notification message.
 */
interface HeadlessNotifyMessageInterface {

  /**
   * Get the message type id.
   */
  public static function getMessageTypeId(): string;

  /**
   * Get the message type label.
   */
  public static function getMessageTypeLabel(): string;

  /**
   * Get the message type.
   */
  public function getType(): string;

  /**
   * Get the message subtype.
   */
  public function getSubType(): ?string;

  /**
   * Get the message parameters.
   */
  public function getParams(): array;

  /**
   * Get the message payload as array.
   */
  public function toArray(): array;

  /**
   * Get the message payload as JSON.
   */
  public function toJson(): string;

  /**
   * Create a new message from an array.
   */
  public static function fromArray(array $data): static;

}

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

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