Skip to content
Snippets Groups Projects
Commit ef78dcce authored by Jennifer Hodgdon's avatar Jennifer Hodgdon
Browse files

Issue #2252081 by Xano: Move implementation-specific docs out of PluginFormInterface

parent 8d07f4ed
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -33,6 +33,13 @@ abstract class PluginBase implements PluginInspectionInterface, DerivativeInspec ...@@ -33,6 +33,13 @@ abstract class PluginBase implements PluginInspectionInterface, DerivativeInspec
/** /**
* Configuration information passed into the plugin. * Configuration information passed into the plugin.
* *
* When using an interface like
* \Drupal\Component\Plugin\ConfigurablePluginInterface, this is where the
* configuration should be stored.
*
* Plugin configuration is optional, so plugin implementations must provide
* their own setters and getters.
*
* @var array * @var array
*/ */
protected $configuration; protected $configuration;
...@@ -89,7 +96,4 @@ public function getDerivativeId() { ...@@ -89,7 +96,4 @@ public function getDerivativeId() {
public function getPluginDefinition() { public function getPluginDefinition() {
return $this->pluginDefinition; return $this->pluginDefinition;
} }
// Note: Plugin configuration is optional so its left to the plugin type to
// require a getter as part of its interface.
} }
...@@ -38,11 +38,6 @@ public function validateConfigurationForm(array &$form, array &$form_state); ...@@ -38,11 +38,6 @@ public function validateConfigurationForm(array &$form, array &$form_state);
/** /**
* Form submission handler. * Form submission handler.
* *
* To properly store submitted form values store them in $this->configuration.
* @code
* $this->configuration['some_value'] = $form_state['values']['some_value'];
* @endcode
*
* @param array $form * @param array $form
* An associative array containing the structure of the form. * An associative array containing the structure of the form.
* @param array $form_state * @param array $form_state
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment