interface TamperInterface in Tamper 8
Interface definition for tamper plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Component\Plugin\ConfigurableInterface
- interface \Drupal\tamper\TamperInterface
Expanded class hierarchy of TamperInterface
All classes that implement TamperInterface
1 file declares its use of TamperInterface
- TamperConfigSchemaTest.php in tests/
src/ Kernel/ TamperConfigSchemaTest.php
File
- src/
TamperInterface.php, line 12
Namespace
Drupal\tamperView source
interface TamperInterface extends PluginInspectionInterface, PluginFormInterface, ConfigurableInterface {
/**
* Tamper data.
*
* Performs the operations on the data to transform it.
*
* @param mixed $data
* The data to tamper.
* @param \Drupal\tamper\TamperableItemInterface $item
* Item that can be tampered as part of a plugin's execution.
*
* @return mixed
* The tampered data.
*
* @throws \Drupal\tamper\Exception\TamperException
* When the plugin can not tamper the given data.
* @throws \Drupal\tamper\Exception\SkipTamperDataException
* When the calling tamper process should be skipped for the given data.
* @throws \Drupal\tamper\Exception\SkipTamperItemException
* When the calling tamper process should be skipped for the given item.
*/
public function tamper($data, TamperableItemInterface $item = NULL);
/**
* Indicates whether the returned value requires multiple handling.
*
* @return bool
* TRUE when the returned value contains a list of values to be processed.
* For example, when the 'data' variable is a string and the tampered value
* is an array.
*/
public function multiple();
/**
* Get a particular configuration value.
*
* @param string $key
* Key of the configuration.
*
* @return mixed|null
* Setting value if found.
*/
public function getSetting($key);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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 |
TamperInterface:: |
public | function | Get a particular configuration value. | 1 |
TamperInterface:: |
public | function | Indicates whether the returned value requires multiple handling. | 1 |
TamperInterface:: |
public | function | Tamper data. | 32 |