interface ShortcodeInterface in Shortcode 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/ShortcodeInterface.php \Drupal\shortcode\Plugin\ShortcodeInterface
Defines the interface for text processing shortcode plugins.
Hierarchy
- interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- interface \Drupal\shortcode\Plugin\ShortcodeInterface
Expanded class hierarchy of ShortcodeInterface
All classes that implement ShortcodeInterface
See also
\Drupal\shortcode\Annotation\Shortcode
\Drupal\shortcode\ShortcodePluginManager
\Drupal\shortcode\Plugin\ShortcodeBase
File
- src/
Plugin/ ShortcodeInterface.php, line 20
Namespace
Drupal\shortcode\PluginView source
interface ShortcodeInterface extends ConfigurableInterface, DependentPluginInterface, PluginInspectionInterface, ContainerFactoryPluginInterface {
/**
* Returns the administrative label for this shortcode plugin.
*
* @return string
* Administrative label.
*/
public function getLabel();
/**
* Returns the administrative description for this shortcode plugin.
*
* @return string
* Administrative description.
*/
public function getDescription();
/**
* Generates a shortcode's settings form.
*
* @param array $form
* A minimally pre-populated form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The state of the (entire) configuration form.
*
* @return array
* The $form array with additional form elements for the settings of this
* filter. The submitted form values should match $this->settings.
*/
public function settingsForm(array $form, FormStateInterface $form_state);
/**
* Performs the shortcode processing.
*
* @param array $attributes
* Array of attributes.
* @param string $text
* The text string to be processed.
* @param string $langcode
* The language code of the text to be filtered. Defaults to
* LANGCODE_NOT_SPECIFIED.
*
* @return string
* The processed text.
*/
public function process(array $attributes, $text, $langcode = Language::LANGCODE_NOT_SPECIFIED);
/**
* Generates a filter's tip.
*
* A filter's tips should be informative and to the point. Short tips are
* preferably one-liners.
*
* @param bool $long
* Whether this callback should return a short tip to display in a form
* (FALSE), or whether a more elaborate filter tips should be returned for
* template_preprocess_filter_tips() (TRUE).
*
* @return string|null
* Translated text to display as a tip, or NULL if this filter has no tip.
*
* @todo Split into getSummaryItem() and buildGuidelines().
*/
public function tips($long = FALSE);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 14 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 15 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 15 |
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 120 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 20 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
ShortcodeInterface:: |
public | function | Returns the administrative description for this shortcode plugin. | 1 |
ShortcodeInterface:: |
public | function | Returns the administrative label for this shortcode plugin. | 1 |
ShortcodeInterface:: |
public | function | Performs the shortcode processing. | 11 |
ShortcodeInterface:: |
public | function | Generates a shortcode's settings form. | 1 |
ShortcodeInterface:: |
public | function | Generates a filter's tip. | 1 |