interface DevelGenerateBaseInterface
Same name in other branches
- 4.x devel_generate/src/DevelGenerateBaseInterface.php \Drupal\devel_generate\DevelGenerateBaseInterface
Base interface definition for "DevelGenerate" plugins.
This interface details base wrapping methods that most DevelGenerate implementations will want to directly inherit from Drupal\devel_generate\DevelGenerateBase.
DevelGenerate implementation plugins should have their own settingsForm() and generateElements() to achieve their own behaviour.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\devel_generate\DevelGenerateBaseInterface extends \Drupal\Component\Plugin\PluginInspectionInterface
Expanded class hierarchy of DevelGenerateBaseInterface
All classes that implement DevelGenerateBaseInterface
3 files declare their use of DevelGenerateBaseInterface
- DevelGenerateCommands.php in devel_generate/
src/ Drush/ Commands/ DevelGenerateCommands.php - DevelGenerateForm.php in devel_generate/
src/ Form/ DevelGenerateForm.php - devel_generate.batch.inc in devel_generate/
devel_generate.batch.inc - Provides common batch functions for every DevelGeneratePlugin.
File
-
devel_generate/
src/ DevelGenerateBaseInterface.php, line 18
Namespace
Drupal\devel_generateView source
interface DevelGenerateBaseInterface extends PluginInspectionInterface {
public function __construct(array $configuration, $plugin_id, $plugin_definition);
/**
* Returns the array of settings, including defaults for missing settings.
*
* @param string $key
* The setting name.
*
* @return array|int|string|bool|null
* The setting.
*/
public function getSetting(string $key);
/**
* Returns the default settings for the plugin.
*
* @return array
* The array of default setting values, keyed by setting names.
*/
public function getDefaultSettings() : array;
/**
* Returns the current settings for the plugin.
*
* @return array
* The array of current setting values, keyed by setting names.
*/
public function getSettings() : array;
/**
* Returns the form for the plugin.
*
* @return array
* The array of default setting values, keyed by setting names.
*/
public function settingsForm(array $form, FormStateInterface $form_state) : array;
/**
* Form validation handler.
*
* @param array $form
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*/
public function settingsFormValidate(array $form, FormStateInterface $form_state) : void;
/**
* Execute the instructions in common for all DevelGenerate plugin.
*
* @param array $values
* The input values from the settings form.
*/
public function generate(array $values) : void;
/**
* Responsible for validating Drush params.
*
* @param array $args
* The command arguments.
* @param array $options
* The commend options.
*
* @return array
* An array of values ready to be used for generateElements().
*/
public function validateDrushParams(array $args, array $options = []) : array;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
DevelGenerateBaseInterface::generate | public | function | Execute the instructions in common for all DevelGenerate plugin. | 1 |
DevelGenerateBaseInterface::getDefaultSettings | public | function | Returns the default settings for the plugin. | 1 |
DevelGenerateBaseInterface::getSetting | public | function | Returns the array of settings, including defaults for missing settings. | 1 |
DevelGenerateBaseInterface::getSettings | public | function | Returns the current settings for the plugin. | 1 |
DevelGenerateBaseInterface::settingsForm | public | function | Returns the form for the plugin. | 1 |
DevelGenerateBaseInterface::settingsFormValidate | public | function | Form validation handler. | 1 |
DevelGenerateBaseInterface::validateDrushParams | public | function | Responsible for validating Drush params. | 8 |
DevelGenerateBaseInterface::__construct | public | function | ||
PluginInspectionInterface::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | 6 |
PluginInspectionInterface::getPluginId | public | function | Gets the plugin ID of the plugin instance. | 2 |