You are here

interface TabInterface in Block Tabs 8

Defines the interface for tab.

Hierarchy

Expanded class hierarchy of TabInterface

All classes that implement TabInterface

See also

\Drupal\blocktabs\Annotation\Tab

\Drupal\blocktabs\TabBase

\Drupal\blocktabs\ConfigurableTabInterface

\Drupal\blocktabs\ConfigurableTabBase

\Drupal\blocktabs\TabManager

Plugin API

1 file declares its use of TabInterface
Blocktabs.php in src/Entity/Blocktabs.php

File

src/TabInterface.php, line 20

Namespace

Drupal\blocktabs
View source
interface TabInterface extends PluginInspectionInterface, ConfigurableInterface, ContextAwarePluginInterface {

  /**
   * Applies a tab to the blocktabs.
   *
   * @param \Drupal\blocktabs\BlocktabsInterface $blocktabs
   *   An blocktabs object.
   *
   * @return bool
   *   TRUE on success. FALSE if unable to add the tab to the blocktabs.
   */
  public function addTab(BlocktabsInterface $blocktabs);

  /**
   * Returns the extension the derivative would have have after adding this tab.
   *
   * @param string $extension
   *   The tab extension the derivative has before adding.
   *
   * @return string
   *   The tab extension after adding.
   */
  public function getDerivativeExtension($extension);

  /**
   * Returns a render array summarizing the configuration of the tab.
   *
   * @return array
   *   A render array.
   */
  public function getSummary();

  /**
   * Returns the tab label.
   *
   * @return string
   *   The tab label.
   */
  public function label();

  /**
   * Returns the unique ID representing the tab.
   *
   * @return string
   *   The tab ID.
   */
  public function getUuid();

  /**
   * Returns the weight of the tab.
   *
   * @return int|string
   *   Either the integer weight of the tab, or an empty string.
   */
  public function getWeight();

  /**
   * Sets the weight for this tab.
   *
   * @param int $weight
   *   The weight for this tab.
   *
   * @return $this
   */
  public function setWeight($weight);

  /**
   * Returns the title of the tab.
   *
   * @return string
   *   Either the string of the tab.
   */
  public function getTitle();

  /**
   * Sets the title for this tab.
   *
   * @param int $title
   *   The title for this tab.
   *
   * @return $this
   */
  public function setTitle($title);

  /**
   * Returns the content of the tab.
   *
   * @return string
   *   The content of the tab.
   */
  public function getContent();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
ContextAwarePluginInterface::getContext public function Gets a defined context. 1
ContextAwarePluginInterface::getContextDefinition public function Gets a specific context definition of the plugin. 2
ContextAwarePluginInterface::getContextDefinitions public function Gets the context definitions of the plugin. 2
ContextAwarePluginInterface::getContextMapping public function Gets a mapping of the expected assignment names to their context names. 1
ContextAwarePluginInterface::getContexts public function Gets the defined contexts. 1
ContextAwarePluginInterface::getContextValue public function Gets the value for a defined context. 1
ContextAwarePluginInterface::getContextValues public function Gets the values for all defined contexts. 1
ContextAwarePluginInterface::setContext public function Set a context on this plugin. 1
ContextAwarePluginInterface::setContextMapping public function Sets a mapping of the expected assignment names to their context names. 1
ContextAwarePluginInterface::setContextValue public function Sets the value for a defined context. 1
ContextAwarePluginInterface::validateContexts public function Validates the set values for the defined contexts. 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
TabInterface::addTab public function Applies a tab to the blocktabs. 3
TabInterface::getContent public function Returns the content of the tab. 1
TabInterface::getDerivativeExtension public function Returns the extension the derivative would have have after adding this tab. 1
TabInterface::getSummary public function Returns a render array summarizing the configuration of the tab. 1
TabInterface::getTitle public function Returns the title of the tab. 1
TabInterface::getUuid public function Returns the unique ID representing the tab. 1
TabInterface::getWeight public function Returns the weight of the tab. 1
TabInterface::label public function Returns the tab label. 1
TabInterface::setTitle public function Sets the title for this tab. 1
TabInterface::setWeight public function Sets the weight for this tab. 1