transmuter-1.0.0-alpha2/src/Plugin/TransmuterInterface.php
src/Plugin/TransmuterInterface.php
<?php
namespace Drupal\transmuter\Plugin;
use Drupal\Component\Plugin\PluginInspectionInterface;
/**
* Base interface for implementing Transmuter plugins.
*
* @see \Drupal\transmuter\Plugin\TransmuterDefinition
*/
interface TransmuterInterface extends PluginInspectionInterface {
/**
* Preprocesses a render element.
*
* This method is normally triggered during the theme preprocess hooks and is
* meant to alter theme variables before they are used by a Twig template.
*
* The preprocess() is called for each of the defined them hooks in the
* TransmuterDefinition::hooks
*
* @param array $variables
* A reference to the render element being preprocessed. Like Drupal
* preprocess hooks this method alters the variables as needed.
* @param string $hook
* The preprocess hook that triggered this preprocess call.
* @param array $info
* The theme registry definition for the item being preprocessed.
*/
public function preprocess(array &$variables, $hook, array $info = []): void;
}
