You are here

public function TipPluginBase::getOutput in Drupal 9

This method should not be used. It is deprecated from TipPluginInterface.

@todo remove in https://drupal.org/node/3195193

Return value

array An intentionally empty array.

Overrides TipPluginInterface::getOutput

1 call to TipPluginBase::getOutput()
TipPluginText::getOutput in core/modules/tour/src/Plugin/tour/tip/TipPluginText.php
This method should not be used. It is deprecated from TipPluginInterface.
3 methods override TipPluginBase::getOutput()
TipPluginImageLegacy::getOutput in core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginImageLegacy.php
This method should not be used. It is deprecated from TipPluginInterface.
TipPluginText::getOutput in core/modules/tour/src/Plugin/tour/tip/TipPluginText.php
This method should not be used. It is deprecated from TipPluginInterface.
TipPluginTextLegacy::getOutput in core/modules/tour/tests/tour_test/src/Plugin/tour/tip/TipPluginTextLegacy.php
This method should not be used. It is deprecated from TipPluginInterface.

File

core/modules/tour/src/TipPluginBase.php, line 130

Class

TipPluginBase
Defines a base tour item implementation.

Namespace

Drupal\tour

Code

public function getOutput() {

  // The getOutput() method was a requirement of TipPluginInterface, but was
  // not part of TipPluginBase prior to it being deprecated. As a result, all
  // tip plugins have their own implementations of getOutput() making it
  // unlikely that this implementation will be called. If it does get called,
  // however, the tour tip will have no content due to this method returning
  // an empty array. To help tour tips from unexpectedly having no content, a
  // warning is triggered. This warning does not stop page
  // execution, but will be logged.
  trigger_error(__NAMESPACE__ . 'TipPluginInterface::getOutput is deprecated. Use getBody() instead. See https://www.drupal.org/node/3204096', E_USER_WARNING);

  // This class must implement TipPluginInterface, but this method is
  // deprecated. An empty array is returned to meet interface requirements.
  return [];
}