class PreProcess in Field Formatter Template 8.2
Same name and namespace in other branches
- 8 src/Event/PreProcess.php \Drupal\fft\Event\PreProcess
Class PreProcess.
@package Drupal\fft\Event
Hierarchy
- class \Drupal\fft\Event\PreProcess extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of PreProcess
1 file declares its use of PreProcess
- fft.module in ./
fft.module - Field formatter template.
File
- src/
Event/ PreProcess.php, line 12
Namespace
Drupal\fft\EventView source
class PreProcess extends Event {
/**
* Pre process event.
*/
const EVENT = 'pre_process';
/**
* The variables.
*
* @var array
*/
public $variables;
/**
* The template file.
*
* @var string
*/
private $template;
/**
* PreProcess constructor.
*
* @param string $template
* The template file.
* @param array $variables
* The variables.
*/
public function __construct($template, array &$variables) {
$this->variables =& $variables;
$this->template = basename($template);
}
/**
* Get template file.
*
* @return string
*/
public function getTemplate() : string {
return $this->template;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PreProcess:: |
private | property | The template file. | |
PreProcess:: |
public | property | The variables. | |
PreProcess:: |
constant | Pre process event. | ||
PreProcess:: |
public | function | Get template file. | |
PreProcess:: |
public | function | PreProcess constructor. |