You are here

interface BlockStyleInterface in Block Style Plugins 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/BlockStyleInterface.php \Drupal\block_style_plugins\Plugin\BlockStyleInterface

Defines an interface for Block style plugins.

Hierarchy

Expanded class hierarchy of BlockStyleInterface

All classes that implement BlockStyleInterface

1 file declares its use of BlockStyleInterface
ConfigureStyles.php in src/Form/ConfigureStyles.php

File

src/Plugin/BlockStyleInterface.php, line 11

Namespace

Drupal\block_style_plugins\Plugin
View source
interface BlockStyleInterface extends PluginInspectionInterface, ConfigurableInterface {

  /**
   * Builds and returns the renderable array for this block style plugin.
   *
   * @param array $variables
   *   List of all variables sent to the theme system.
   *
   * @return array
   *   A renderable array representing the content of the block.
   */
  public function build(array $variables);

  /**
   * Add theme suggestions for the block.
   *
   * @param array $suggestions
   *   List of theme suggestions.
   * @param array $variables
   *   List of variables from a preprocess hook.
   *
   * @return array
   *   List of all theme suggestions.
   */
  public function themeSuggestion(array $suggestions, array $variables);

}

Members

Namesort descending Modifiers Type Description Overrides
BlockStyleInterface::build public function Builds and returns the renderable array for this block style plugin. 1
BlockStyleInterface::themeSuggestion public function Add theme suggestions for the block. 1
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
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