abstract class EmptyFieldHandler in Empty fields 7.2
Abstract base class defining a field_empty_handler.
Defines a way to easily create empty field reaction plugins.
Hierarchy
- class \EmptyFieldHandler
Expanded class hierarchy of EmptyFieldHandler
See also
field_empty_handler_text().
File
- plugins/
empty_fields_handler.inc, line 14 - Contains the base class for empty field handler classes.
View source
abstract class EmptyFieldHandler {
public $options;
/**
* Create a new EmptyFieldHandler.
*/
public function __construct() {
$this->options = $this
->defaults();
}
/**
* Default options that map to FAPI elements in EmptyFieldHandler::form().
*/
public function defaults() {
return array();
}
/**
* Provide FAPI elements to configure the empty field rendering.
*/
public function form($context) {
return array();
}
/**
* Provide the summary text to display on the field display settings page.
*/
public abstract function summaryText();
/**
* Provide a reaction. Set the content of the field.
*/
public abstract function react($context);
/**
* Provide a method to alter the output of the plugin.
*/
public function alterOutput(&$output, $context) {
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EmptyFieldHandler:: |
public | property | ||
EmptyFieldHandler:: |
public | function | Provide a method to alter the output of the plugin. | |
EmptyFieldHandler:: |
public | function | Default options that map to FAPI elements in EmptyFieldHandler::form(). | 2 |
EmptyFieldHandler:: |
public | function | Provide FAPI elements to configure the empty field rendering. | 2 |
EmptyFieldHandler:: |
abstract public | function | Provide a reaction. Set the content of the field. | 2 |
EmptyFieldHandler:: |
abstract public | function | Provide the summary text to display on the field display settings page. | 2 |
EmptyFieldHandler:: |
public | function | Create a new EmptyFieldHandler. |