interface DevelGenerateBaseInterface in Devel 8
Same name and namespace in other branches
- 8.3 devel_generate/src/DevelGenerateBaseInterface.php \Drupal\devel_generate\DevelGenerateBaseInterface
- 8.2 devel_generate/src/DevelGenerateBaseInterface.php \Drupal\devel_generate\DevelGenerateBaseInterface
- 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 impementationa plugins should developing settingsForm() and generateElements() to achieve its own behaviour.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\devel_generate\DevelGenerateBaseInterface
Expanded class hierarchy of DevelGenerateBaseInterface
All classes that implement DevelGenerateBaseInterface
2 files declare their use of DevelGenerateBaseInterface
- DevelGenerateCommands.php in devel_generate/
src/ Commands/ DevelGenerateCommands.php - devel_generate.drush8.inc in devel_generate/
drush/ devel_generate.drush8.inc - Integration with Drush8. Drush9 commands are in src/Commands.
File
- devel_generate/
src/ DevelGenerateBaseInterface.php, line 18
Namespace
Drupal\devel_generateView source
interface DevelGenerateBaseInterface extends PluginInspectionInterface {
/**
* Returns the array of settings, including defaults for missing settings.
*
* @return array
* The array of settings.
*/
function getSetting($key);
/**
* Returns the default settings for the plugin.
*
* @return array
* The array of default setting values, keyed by setting names.
*/
function getDefaultSettings();
/**
* Returns the current settings for the plugin.
*
* @return array
* The array of current setting values, keyed by setting names.
*/
function getSettings();
/**
* Returns the form for the plugin.
*
* @return array
* The array of default setting values, keyed by setting names.
*/
function settingsForm(array $form, FormStateInterface $form_state);
/**
* 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.
*/
function settingsFormValidate(array $form, FormStateInterface $form_state);
/**
* Execute the instructions in common for all DevelGenerate plugin
*
* @param array $values
* The input values from the settings form.
*/
function generate(array $values);
/**
* Responsible for validating Drush params.
*
* @Return an array of values ready to be used for generateElements()
*/
function validateDrushParams($args);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DevelGenerateBaseInterface:: |
function | Execute the instructions in common for all DevelGenerate plugin | 1 | |
DevelGenerateBaseInterface:: |
function | Returns the default settings for the plugin. | 1 | |
DevelGenerateBaseInterface:: |
function | Returns the array of settings, including defaults for missing settings. | 1 | |
DevelGenerateBaseInterface:: |
function | Returns the current settings for the plugin. | 1 | |
DevelGenerateBaseInterface:: |
function | Returns the form for the plugin. | 1 | |
DevelGenerateBaseInterface:: |
function | Form validation handler. | 1 | |
DevelGenerateBaseInterface:: |
function | Responsible for validating Drush params. | 6 | |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |