You are here

public function TamperInterface::tamper in Tamper 8

Tamper data.

Performs the operations on the data to transform it.

Parameters

mixed $data: The data to tamper.

\Drupal\tamper\TamperableItemInterface $item: Item that can be tampered as part of a plugin's execution.

Return value

mixed The tampered data.

Throws

\Drupal\tamper\Exception\TamperException When the plugin can not tamper the given data.

\Drupal\tamper\Exception\SkipTamperDataException When the calling tamper process should be skipped for the given data.

\Drupal\tamper\Exception\SkipTamperItemException When the calling tamper process should be skipped for the given item.

32 methods override TamperInterface::tamper()
ArrayFilter::tamper in src/Plugin/Tamper/ArrayFilter.php
Tamper data.
CastToInt::tamper in src/Plugin/Tamper/CastToInt.php
Tamper data.
ConvertBoolean::tamper in src/Plugin/Tamper/ConvertBoolean.php
Tamper data.
ConvertCase::tamper in src/Plugin/Tamper/ConvertCase.php
Tamper data.
Copy::tamper in src/Plugin/Tamper/Copy.php
Tamper data.

... See full list

File

src/TamperInterface.php, line 34

Class

TamperInterface
Interface definition for tamper plugins.

Namespace

Drupal\tamper

Code

public function tamper($data, TamperableItemInterface $item = NULL);