You are here

class MessageNotifierTest in Message Notify 8

Test notifier.

Plugin annotation


@Notifier(
  id = "test",
  title = @Translation("Test notifier"),
  description = @Translation("A notifier plugin for tests"),
  viewModes = {
    "foo",
    "bar"
  }
)

Hierarchy

Expanded class hierarchy of MessageNotifierTest

File

tests/modules/message_notify_test/src/Plugin/Notifier/MessageNotifierTest.php, line 20

Namespace

Drupal\message_notify_test\Plugin\Notifier
View source
class MessageNotifierTest extends MessageNotifierBase {

  /**
   * {@inheritdoc}
   */
  public function deliver(array $output = []) {
    $this->message->output = $output;

    // Return TRUE or FALSE as it was set on the Message.
    return empty($this->message->fail);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MessageNotifierBase::$entityTypeManager protected property The entity type manager service.
MessageNotifierBase::$logger protected property The logger channel.
MessageNotifierBase::$message protected property The message entity.
MessageNotifierBase::$renderer protected property The rendering service.
MessageNotifierBase::access public function Determine if user can access notifier. Overrides MessageNotifierInterface::access
MessageNotifierBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create 1
MessageNotifierBase::postSend public function Save the rendered messages if needed. Invoke watchdog error on failure. Overrides MessageNotifierInterface::postSend
MessageNotifierBase::send public function Entry point to send and process a message. Overrides MessageNotifierInterface::send
MessageNotifierBase::setMessage public function Set the message object for the notifier. Overrides MessageNotifierInterface::setMessage
MessageNotifierBase::__construct public function Constructs the plugin. Overrides PluginBase::__construct 1
MessageNotifierTest::deliver public function Deliver a message via the required transport method. Overrides MessageNotifierInterface::deliver
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.