You are here

interface DisplayInterface in Search API 8

Defines an interface for display plugins.

Hierarchy

Expanded class hierarchy of DisplayInterface

All classes that implement DisplayInterface

See also

\Drupal\search_api\Annotation\SearchApiDisplay

\Drupal\search_api\Display\DisplayPluginManager

\Drupal\search_api\Display\DisplayPluginBase

Plugin API

File

src/Display/DisplayInterface.php, line 19

Namespace

Drupal\search_api\Display
View source
interface DisplayInterface extends HideablePluginInterface, PluginInspectionInterface, DerivativeInspectionInterface, ContainerFactoryPluginInterface, DependentPluginInterface {

  /**
   * Returns the display label.
   *
   * @return string
   *   A human-readable label for the display.
   */
  public function label();

  /**
   * Returns the display description.
   *
   * @return string
   *   A human-readable description for the display.
   */
  public function getDescription();

  /**
   * Returns the index used by this display.
   *
   * @return \Drupal\search_api\IndexInterface
   *   The search index used by this display.
   */
  public function getIndex();

  /**
   * Returns the URL of this display.
   *
   * @return \Drupal\Core\Url|null
   *   The URL of the display, or NULL if there is no specific URL for it.
   *
   * @deprecated in search_api:8.x-1.0-beta5 and is removed from
   *   search_api:2.0.0. Use getPath() instead.
   *
   * @see https://www.drupal.org/node/2856050
   */
  public function getUrl();

  /**
   * Returns the base path used by this display.
   *
   * @return string|null
   *   The base path for this display, or NULL if there is none.
   */
  public function getPath();

  /**
   * Returns true if the display is being rendered in the current request.
   *
   * @return bool
   *   True when the display is rendered in the current request.
   */
  public function isRenderedInCurrentRequest();

}

Members

Namesort descending Modifiers Type Description Overrides
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
DisplayInterface::getDescription public function Returns the display description. 1
DisplayInterface::getIndex public function Returns the index used by this display. 1
DisplayInterface::getPath public function Returns the base path used by this display. 1
DisplayInterface::getUrl Deprecated public function Returns the URL of this display. 1
DisplayInterface::isRenderedInCurrentRequest public function Returns true if the display is being rendered in the current request. 1
DisplayInterface::label public function Returns the display label. 1
HideablePluginInterface::isHidden public function Determines whether this plugin should be hidden in the UI. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2