interface ViewsHandlerInterface in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views/src/Plugin/views/ViewsHandlerInterface.php \Drupal\views\Plugin\views\ViewsHandlerInterface
Provides an interface for all views handlers.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface
- interface \Drupal\views\Plugin\views\ViewsPluginInterface
- interface \Drupal\views\Plugin\views\ViewsHandlerInterface
- interface \Drupal\views\Plugin\views\ViewsPluginInterface
Expanded class hierarchy of ViewsHandlerInterface
All classes that implement ViewsHandlerInterface
1 file declares its use of ViewsHandlerInterface
- FieldHandlerInterface.php in core/
modules/ views/ src/ Plugin/ views/ field/ FieldHandlerInterface.php
File
- core/
modules/ views/ src/ Plugin/ views/ ViewsHandlerInterface.php, line 11
Namespace
Drupal\views\Plugin\viewsView source
interface ViewsHandlerInterface extends ViewsPluginInterface {
/**
* Run before the view is built.
*
* This gives all the handlers some time to set up before any handler has
* been fully run.
*/
public function preQuery();
/**
* Determines the entity type used by this handler.
*
* If this handler uses a relationship, the base class of the relationship is
* taken into account.
*
* @return string
* The machine name of the entity type.
*/
public function getEntityType();
/**
* Determines if the handler is considered 'broken', meaning it's a
* placeholder used when a handler can't be found.
*/
public function broken();
/**
* Ensure the main table for this handler is in the query. This is used
* a lot.
*/
public function ensureMyTable();
/**
* Check whether given user has access to this handler.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The user account to check.
*
* @return bool
* TRUE if the user has access to the handler, FALSE otherwise.
*/
public function access(AccountInterface $account);
/**
* Get the join object that should be used for this handler.
*
* This method isn't used a great deal, but it's very handy for easily
* getting the join if it is necessary to make some changes to it, such
* as adding an 'extra'.
*/
public function getJoin();
/**
* Sanitize the value for output.
*
* @param $value
* The value being rendered.
* @param $type
* The type of sanitization needed. If not provided,
* \Drupal\Component\Utility\Html::escape() is used.
*
* @return \Drupal\views\Render\ViewsRenderPipelineMarkup
* Returns the safe value.
*/
public function sanitizeValue($value, $type = NULL);
/**
* Fetches a handler to join one table to a primary table from the data cache.
*
* @param string $table
* The table to join from.
* @param string $base_table
* The table to join to.
*
* @return \Drupal\views\Plugin\views\join\JoinPluginBase
*/
public static function getTableJoin($table, $base_table);
/**
* Shortcut to get a handler's raw field value.
*
* This should be overridden for handlers with formulae or other
* non-standard fields. Because this takes an argument, fields
* overriding this can just call return parent::getField($formula)
*/
public function getField($field = NULL);
/**
* Run after the view is executed, before the result is cached.
*
* This gives all the handlers some time to modify values. This is primarily
* used so that handlers that pull up secondary data can put it in the
* $values so that the raw data can be used externally.
*/
public function postExecute(&$values);
/**
* Shortcut to display the exposed options form.
*/
public function showExposeForm(&$form, FormStateInterface $form_state);
/**
* Called just prior to query(), this lets a handler set up any relationship
* it needs.
*/
public function setRelationship();
/**
* Return a string representing this handler's name in the UI.
*/
public function adminLabel($short = FALSE);
/**
* Breaks x,y,z and x+y+z into an array.
*
* @param string $str
* The string to split.
* @param bool $force_int
* Enforce a numeric check.
*
* @return object
* A stdClass object containing value and operator properties.
*/
public static function breakString($str, $force_int = FALSE);
/**
* Provide text for the administrative summary.
*/
public function adminSummary();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
ViewsHandlerInterface:: |
public | function | Check whether given user has access to this handler. | 1 |
ViewsHandlerInterface:: |
public | function | Return a string representing this handler's name in the UI. | 1 |
ViewsHandlerInterface:: |
public | function | Provide text for the administrative summary. | 1 |
ViewsHandlerInterface:: |
public static | function | Breaks x,y,z and x+y+z into an array. | 1 |
ViewsHandlerInterface:: |
public | function | Determines if the handler is considered 'broken', meaning it's a placeholder used when a handler can't be found. | 1 |
ViewsHandlerInterface:: |
public | function | Ensure the main table for this handler is in the query. This is used a lot. | 1 |
ViewsHandlerInterface:: |
public | function | Determines the entity type used by this handler. | 1 |
ViewsHandlerInterface:: |
public | function | Shortcut to get a handler's raw field value. | 1 |
ViewsHandlerInterface:: |
public | function | Get the join object that should be used for this handler. | 1 |
ViewsHandlerInterface:: |
public static | function | Fetches a handler to join one table to a primary table from the data cache. | 1 |
ViewsHandlerInterface:: |
public | function | Run after the view is executed, before the result is cached. | 1 |
ViewsHandlerInterface:: |
public | function | Run before the view is built. | 1 |
ViewsHandlerInterface:: |
public | function | Sanitize the value for output. | 1 |
ViewsHandlerInterface:: |
public | function | Called just prior to query(), this lets a handler set up any relationship it needs. | 1 |
ViewsHandlerInterface:: |
public | function | Shortcut to display the exposed options form. | 1 |
ViewsPluginInterface:: |
public | function | Provide a form to edit options for this plugin. | 1 |
ViewsPluginInterface:: |
public static | function | ||
ViewsPluginInterface:: |
public | function | Clears a plugin. | 1 |
ViewsPluginInterface:: |
public | function | Filter out stored options depending on the defined options. | 1 |
ViewsPluginInterface:: |
public | function | Returns an array of available token replacements. | 1 |
ViewsPluginInterface:: |
public | function | Returns the plugin provider. | 1 |
ViewsPluginInterface:: |
public | function | Adds elements for available core tokens to a form. | 1 |
ViewsPluginInterface:: |
public | function | Returns a string with any core tokens replaced. | 1 |
ViewsPluginInterface:: |
public | function | Initialize the plugin. | 1 |
ViewsPluginInterface:: |
public | function | Return the human readable name of the display. | 1 |
ViewsPluginInterface:: |
public static | function | Moves form elements into fieldsets for presentation purposes. | 1 |
ViewsPluginInterface:: |
public static | function | Flattens the structure of form elements. | 1 |
ViewsPluginInterface:: |
public | function | Add anything to the query that we might need to. | 1 |
ViewsPluginInterface:: |
public | function | Handle any special handling on the validate form. | 1 |
ViewsPluginInterface:: |
public | function | Returns the summary of the settings in the display. | 1 |
ViewsPluginInterface:: |
public | function | Provide a full list of possible theme templates used by this style. | 1 |
ViewsPluginInterface:: |
public | function | Unpack options over our existing defaults, drilling down into arrays so that defaults don't get totally blown away. | 1 |
ViewsPluginInterface:: |
public | function | Returns the usesOptions property. | 1 |
ViewsPluginInterface:: |
public | function | Validate that the plugin is correct and can be saved. | 1 |
ViewsPluginInterface:: |
public | function | Validate the options form. | 1 |