interface BlockStyleInterface in Block Style Plugins 8
Same name and namespace in other branches
- 8.2 src/Plugin/BlockStyleInterface.php \Drupal\block_style_plugins\Plugin\BlockStyleInterface
Defines an interface for Block style plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Core\Plugin\PluginFormInterface
- interface \Drupal\block_style_plugins\Plugin\BlockStyleInterface
Expanded class hierarchy of BlockStyleInterface
All classes that implement BlockStyleInterface
File
- src/
Plugin/ BlockStyleInterface.php, line 13
Namespace
Drupal\block_style_plugins\PluginView source
interface BlockStyleInterface extends PluginInspectionInterface, ConfigurableInterface, PluginFormInterface {
/**
* Returns the configuration form elements specific to a block configuration.
*
* This code will be run as part of a form alter so that the current blocks
* configuration will be available to this method.
*
* @param array $form
* The form definition array for the block configuration form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return array
* The renderable form array representing the entire configuration form.
*/
public function prepareForm(array $form, FormStateInterface $form_state);
/**
* Returns a customized form array with new form settings for styles.
*
* @param array $form
* The form definition array for the block configuration form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return array
* The renderable form array representing the entire configuration form.
*/
public function formAlter(array $form, FormStateInterface $form_state);
/**
* Adds block style specific submission handling for the block form.
*
* @param array $form
* The form definition array for the full block configuration form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*/
public function submitForm($form, FormStateInterface $form_state);
/**
* 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);
/**
* Exclude styles from appearing on a block.
*
* Determine if configuration should be excluded from certain blocks when a
* block plugin id or block content type is passed from a plugin.
*
* @return bool
* Return True if the current block should not get the styles.
*/
public function exclude();
/**
* Only show styles on specific blocks.
*
* Determine if configuration should be only included on certain blocks when a
* block plugin id or block content type is passed from a plugin.
*
* @return bool
* Return True if the current block should only get the styles.
*/
public function includeOnly();
/**
* 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlockStyleInterface:: |
public | function | Builds and returns the renderable array for this block style plugin. | 1 |
BlockStyleInterface:: |
public | function | Exclude styles from appearing on a block. | 1 |
BlockStyleInterface:: |
public | function | Returns a customized form array with new form settings for styles. | 1 |
BlockStyleInterface:: |
public | function | Only show styles on specific blocks. | 1 |
BlockStyleInterface:: |
public | function | Returns the configuration form elements specific to a block configuration. | 1 |
BlockStyleInterface:: |
public | function | Adds block style specific submission handling for the block form. | 1 |
BlockStyleInterface:: |
public | function | Add theme suggestions for the block. | 1 |
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |