From 1dde116dfa9cbf7aad885285b3adf9b782251a53 Mon Sep 17 00:00:00 2001 From: Daniel Wehner Date: Mon, 13 Aug 2012 00:15:36 +0200 Subject: [PATCH] re-add and improve the documented variables on the handler --- lib/Drupal/views/Plugin/views/Handler.php | 64 +++++++++++++++++++++-- lib/Drupal/views/Plugin/views/Plugin.php | 23 +++++--- 2 files changed, 78 insertions(+), 9 deletions(-) diff --git a/lib/Drupal/views/Plugin/views/Handler.php b/lib/Drupal/views/Plugin/views/Handler.php index 6abddef36c2..bd5a5612e72 100644 --- a/lib/Drupal/views/Plugin/views/Handler.php +++ b/lib/Drupal/views/Plugin/views/Handler.php @@ -11,10 +11,68 @@ use Drupal\views\View; class Handler extends Plugin { /** - * init the handler with necessary data. - * @param $view + * Where the $query object will reside: + * + * @var Drupal\views\Plugin\views\query\QueryPluginBase + */ + public $query = NULL; + + /** + * The table this handler is attached to. + * + * @var string + */ + public $table; + + /** + * The alias of the table of this handler which is used in the query. + * + * @var string + */ + public $table_alias; + + /** + * When a table has been moved this property is set. + * + * @var string + */ + public $actual_table; + + /** + * The actual field in the database table, maybe different + * on other kind of query plugins/special handlers. + * + * @var string + */ + public $real_field; + + /** + * With field you can override the real_field if the real field is not set. + * + * @var string + */ + public $field; + + /** + * When a field has been moved this property is set. + * + * @var string + */ + public $actual_field; + + /** + * The relationship used for this field. + * + * @var string + */ + public $relationship = NULL; + + /** + * Init the handler with necessary data. + * + * @param Drupal\views\View $view * The $view object this handler is attached to. - * @param $options + * @param array $options * The item from the database; the actual contents of this will vary * based upon the type of handler. */ diff --git a/lib/Drupal/views/Plugin/views/Plugin.php b/lib/Drupal/views/Plugin/views/Plugin.php index d881f959b3f..7d0f05b5464 100644 --- a/lib/Drupal/views/Plugin/views/Plugin.php +++ b/lib/Drupal/views/Plugin/views/Plugin.php @@ -13,27 +13,38 @@ abstract class Plugin extends PluginBase { /** * Except for displays, options for the object will be held here. + * + * @var array */ - var $options = array(); + public $options = array(); /** * The top object of a view. * - * @var view + * @var Drupal\views\View */ - var $view = NULL; + public $view = NULL; /** - * Handler's definition + * Plugins's definition * * @var array */ - var $definition; + public $definition; /** * The plugin type of this plugin, for example style or query. */ - var $plugin_type = NULL; + public $plugin_type = NULL; + + /** + * An array which identifies the instance in the views plugin hierarchy. + * + * For handlers this is for example display_id, type, table, id. + * + * @var array + */ + public $localization_keys; /** * Constructs a Plugin object.