diff --git a/lib/Drupal/views/Analyzer.php b/lib/Drupal/views/Analyzer.php index 9d83116..0331b53 100644 --- a/lib/Drupal/views/Analyzer.php +++ b/lib/Drupal/views/Analyzer.php @@ -137,4 +137,5 @@ class Analyzer { static function formatMessage($message, $type = 'error') { return array('message' => $message, 'type' => $type); } + } diff --git a/lib/Drupal/views/Join.php b/lib/Drupal/views/Join.php index 99c5a2b..4adb021 100644 --- a/lib/Drupal/views/Join.php +++ b/lib/Drupal/views/Join.php @@ -59,14 +59,20 @@ namespace Drupal\views; * - - numeric: If true, the value will not be surrounded in quotes. * - - extra type: How all the extras will be combined. Either AND or OR. Defaults to AND. */ - class Join { + var $table = NULL; + var $left_table = NULL; + var $left_field = NULL; + var $field = NULL; + var $extra = NULL; + var $type = NULL; + var $definition = array(); /** @@ -204,6 +210,7 @@ class Join { $select_query->addJoin($this->type, $right_table, $table['alias'], $condition, $arguments); } + } /** diff --git a/lib/Drupal/views/JoinSubquery.php b/lib/Drupal/views/JoinSubquery.php index de4fa7e..dcc4b90 100644 --- a/lib/Drupal/views/JoinSubquery.php +++ b/lib/Drupal/views/JoinSubquery.php @@ -19,6 +19,7 @@ use Drupal\views\Join; * - left_query: The subquery to use in the left side of the join clause. */ class JoinSubquery extends Join { + function construct($table = NULL, $left_table = NULL, $left_field = NULL, $field = NULL, $extra = array(), $type = 'LEFT') { parent::construct($table, $left_table, $left_field, $field, $extra, $type); $this->left_query = $this->definition['left_query']; @@ -99,4 +100,5 @@ class JoinSubquery extends Join { $select_query->addJoin($this->type, $right_table, $table['alias'], $condition, $arguments); } + } diff --git a/lib/Drupal/views/Plugin/Discovery/ViewsDiscovery.php b/lib/Drupal/views/Plugin/Discovery/ViewsDiscovery.php index fda051c..9e6042c 100644 --- a/lib/Drupal/views/Plugin/Discovery/ViewsDiscovery.php +++ b/lib/Drupal/views/Plugin/Discovery/ViewsDiscovery.php @@ -13,6 +13,7 @@ use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; * Discovery interface which supports the hook_views_plugins mechanism. */ class ViewsDiscovery extends AnnotatedClassDiscovery { + public function getDefinitions() { $definitions = parent::getDefinitions(); foreach ($definitions as $definition) { @@ -51,4 +52,5 @@ class ViewsDiscovery extends AnnotatedClassDiscovery { return $definitions; } + } diff --git a/lib/Drupal/views/Plugin/Type/ViewsPluginManager.php b/lib/Drupal/views/Plugin/Type/ViewsPluginManager.php index ed3ee74..f36493b 100644 --- a/lib/Drupal/views/Plugin/Type/ViewsPluginManager.php +++ b/lib/Drupal/views/Plugin/Type/ViewsPluginManager.php @@ -13,6 +13,7 @@ use Drupal\views\Plugin\Discovery\ViewsDiscovery; use Drupal\Core\Plugin\Discovery\CacheDecorator; class ViewsPluginManager extends PluginManagerBase { + /** * The handler type of this plugin manager, for example filter or field. * @@ -26,4 +27,5 @@ class ViewsPluginManager extends PluginManagerBase { $this->discovery = new CacheDecorator(new ViewsDiscovery('views', $this->type), 'views:' . $this->type, 'cache'); $this->factory = new DefaultFactory($this->discovery); } + } diff --git a/lib/Drupal/views/Plugin/views/Handler.php b/lib/Drupal/views/Plugin/views/Handler.php index bd5a561..d0c4c07 100644 --- a/lib/Drupal/views/Plugin/views/Handler.php +++ b/lib/Drupal/views/Plugin/views/Handler.php @@ -9,7 +9,8 @@ namespace Drupal\views\Plugin\views; use Drupal\views\Plugin\views\Plugin; use Drupal\views\View; -class Handler extends Plugin { +abstract class Handler extends Plugin { + /** * Where the $query object will reside: * @@ -603,4 +604,5 @@ class Handler extends Plugin { * a placeholder used when a handler can't be found. */ function broken() { } + } diff --git a/lib/Drupal/views/Plugin/views/Plugin.php b/lib/Drupal/views/Plugin/views/Plugin.php index 7d0f05b..227d298 100644 --- a/lib/Drupal/views/Plugin/views/Plugin.php +++ b/lib/Drupal/views/Plugin/views/Plugin.php @@ -451,4 +451,5 @@ abstract class Plugin extends PluginBase { } return check_plain($this->definition['title']); } + } diff --git a/lib/Drupal/views/Plugin/views/access/AccessPluginBase.php b/lib/Drupal/views/Plugin/views/access/AccessPluginBase.php index a844deb..4b9dfc8 100644 --- a/lib/Drupal/views/Plugin/views/access/AccessPluginBase.php +++ b/lib/Drupal/views/Plugin/views/access/AccessPluginBase.php @@ -21,6 +21,7 @@ use Drupal\views\Plugin\views\Plugin; * The base plugin to handle access control. */ abstract class AccessPluginBase extends Plugin { + /** * Initialize the plugin. * @@ -93,6 +94,7 @@ abstract class AccessPluginBase extends Plugin { // default to no access control. return TRUE; } + } /** diff --git a/lib/Drupal/views/Plugin/views/access/None.php b/lib/Drupal/views/Plugin/views/access/None.php index 05d8ad1..54695a2 100644 --- a/lib/Drupal/views/Plugin/views/access/None.php +++ b/lib/Drupal/views/Plugin/views/access/None.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * Access plugin that provides no access control at all. * * @ingroup views_access_plugins - */ - -/** + * * @Plugin( * id = "none", * title = @Translation("None"), @@ -25,7 +23,9 @@ use Drupal\Core\Annotation\Plugin; * ) */ class None extends AccessPluginBase { + function summary_title() { return t('Unrestricted'); } + } diff --git a/lib/Drupal/views/Plugin/views/access/Permission.php b/lib/Drupal/views/Plugin/views/access/Permission.php index 96dd4b4..82620b2 100644 --- a/lib/Drupal/views/Plugin/views/access/Permission.php +++ b/lib/Drupal/views/Plugin/views/access/Permission.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Access plugin that provides permission-based access control. * * @ingroup views_access_plugins - */ - -/** + * * @Plugin( * id = "perm", * title = @Translation("Permission"), @@ -26,6 +24,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Permission extends AccessPluginBase { + function access($account) { return views_check_perm($this->options['perm'], $account); } @@ -74,4 +73,5 @@ class Permission extends AccessPluginBase { '#description' => t('Only users with the selected permission flag will be able to access this display. Note that users with "access all views" can see any view, regardless of other permissions.'), ); } + } diff --git a/lib/Drupal/views/Plugin/views/access/Role.php b/lib/Drupal/views/Plugin/views/access/Role.php index a21c296..ddfe290 100644 --- a/lib/Drupal/views/Plugin/views/access/Role.php +++ b/lib/Drupal/views/Plugin/views/access/Role.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Access plugin that provides role-based access control. * * @ingroup views_access_plugins - */ - -/** + * * @Plugin( * id = "role", * title = @Translation("Role"), @@ -26,6 +24,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Role extends AccessPluginBase { + function access($account) { return views_check_roles(array_filter($this->options['role']), $account); } @@ -78,4 +77,5 @@ class Role extends AccessPluginBase { // I hate checkboxes. $form_state['values']['access_options']['role'] = array_filter($form_state['values']['access_options']['role']); } + } diff --git a/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php b/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php index 3d31a9d..7eb3876 100644 --- a/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php +++ b/lib/Drupal/views/Plugin/views/area/AreaPluginBase.php @@ -22,10 +22,7 @@ use Drupal\views\Plugin\views\Handler; * * @ingroup views_area_handlers */ - -/** - */ -class AreaPluginBase extends Handler { +abstract class AreaPluginBase extends Handler { /** * Overrides Handler::init(). @@ -108,6 +105,7 @@ class AreaPluginBase extends Handler { function use_group_by() { return FALSE; } + } /** diff --git a/lib/Drupal/views/Plugin/views/area/Broken.php b/lib/Drupal/views/Plugin/views/area/Broken.php index 6636b03..070cd9a 100644 --- a/lib/Drupal/views/Plugin/views/area/Broken.php +++ b/lib/Drupal/views/Plugin/views/area/Broken.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * A special handler to take the place of missing or broken handlers. * * @ingroup views_area_handlers - */ - -/** + * * @Plugin( * id = "broken" * ) */ class Broken extends AreaPluginBase { + function ui_name($short = FALSE) { return t('Broken/missing handler'); } @@ -37,5 +36,8 @@ class Broken extends AreaPluginBase { /** * Determine if the handler is considered 'broken' */ - function broken() { return TRUE; } + function broken() { + return TRUE; + } + } diff --git a/lib/Drupal/views/Plugin/views/area/Result.php b/lib/Drupal/views/Plugin/views/area/Result.php index fe5bc24..8093b5d 100644 --- a/lib/Drupal/views/Plugin/views/area/Result.php +++ b/lib/Drupal/views/Plugin/views/area/Result.php @@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin; * Views area handler to display some configurable result summary. * * @ingroup views_area_handlers - */ - -/** + * * @Plugin( * id = "result" * ) @@ -103,4 +101,5 @@ class Result extends AreaPluginBase { } return $output; } + } diff --git a/lib/Drupal/views/Plugin/views/area/Text.php b/lib/Drupal/views/Plugin/views/area/Text.php index 5834b34..e7b8fc1 100644 --- a/lib/Drupal/views/Plugin/views/area/Text.php +++ b/lib/Drupal/views/Plugin/views/area/Text.php @@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin; * Views area text handler. * * @ingroup views_area_handlers - */ - -/** + * * @Plugin( * id = "text" * ) @@ -117,4 +115,5 @@ class Text extends AreaPluginBase { return check_markup($value, $format, '', FALSE); } } + } diff --git a/lib/Drupal/views/Plugin/views/area/TextCustom.php b/lib/Drupal/views/Plugin/views/area/TextCustom.php index bb3e190..68858d2 100644 --- a/lib/Drupal/views/Plugin/views/area/TextCustom.php +++ b/lib/Drupal/views/Plugin/views/area/TextCustom.php @@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin; * Views area text handler. * * @ingroup views_area_handlers - */ - -/** + * * @Plugin( * id = "text_custom" * ) diff --git a/lib/Drupal/views/Plugin/views/area/View.php b/lib/Drupal/views/Plugin/views/area/View.php index 7432df0..ca26b42 100644 --- a/lib/Drupal/views/Plugin/views/area/View.php +++ b/lib/Drupal/views/Plugin/views/area/View.php @@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin; * Views area handlers. Insert a view inside of an area. * * @ingroup views_area_handlers - */ - -/** + * * @Plugin( * id = "view" * ) @@ -90,4 +88,5 @@ class View extends AreaPluginBase { } return ''; } + } diff --git a/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php b/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php index b3b5cc9..9369131 100644 --- a/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php +++ b/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php @@ -40,10 +40,7 @@ use Drupal\views\Plugin\views\Handler; * * @ingroup views_argument_handlers */ - -/** - */ -class ArgumentPluginBase extends Handler { +abstract class ArgumentPluginBase extends Handler { var $validator = NULL; var $argument = NULL; diff --git a/lib/Drupal/views/Plugin/views/argument/Broken.php b/lib/Drupal/views/Plugin/views/argument/Broken.php index 7ffc834..802f1b2 100644 --- a/lib/Drupal/views/Plugin/views/argument/Broken.php +++ b/lib/Drupal/views/Plugin/views/argument/Broken.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * A special handler to take the place of missing or broken handlers. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "broken" * ) */ class Broken extends ArgumentPluginBase { + function ui_name($short = FALSE) { return t('Broken/missing handler'); } @@ -37,4 +36,5 @@ class Broken extends ArgumentPluginBase { * Determine if the handler is considered 'broken' */ function broken() { return TRUE; } + } diff --git a/lib/Drupal/views/Plugin/views/argument/Date.php b/lib/Drupal/views/Plugin/views/argument/Date.php index 11185a9..cc4aaa3 100644 --- a/lib/Drupal/views/Plugin/views/argument/Date.php +++ b/lib/Drupal/views/Plugin/views/argument/Date.php @@ -26,9 +26,7 @@ use Drupal\Core\Annotation\Plugin; * @see Drupal\views\ManyTonOneHelper * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "date" * ) diff --git a/lib/Drupal/views/Plugin/views/argument/Formula.php b/lib/Drupal/views/Plugin/views/argument/Formula.php index 9f47b8c..b6dc040 100644 --- a/lib/Drupal/views/Plugin/views/argument/Formula.php +++ b/lib/Drupal/views/Plugin/views/argument/Formula.php @@ -18,15 +18,15 @@ use Drupal\Core\Annotation\Plugin; * - formula: The formula to use for this handler. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "formula" * ) */ class Formula extends ArgumentPluginBase { + var $formula = NULL; + /** * Constructor */ @@ -70,4 +70,5 @@ class Formula extends ArgumentPluginBase { ); $this->query->add_where(0, $formula, $placeholders, 'formula'); } + } diff --git a/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php b/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php index 61c8b91..7f8ae5b 100644 --- a/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php +++ b/lib/Drupal/views/Plugin/views/argument/GroupByNumeric.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Simple handler for arguments using group by. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "groupby_numeric" * ) */ -class GroupByNumeric extends ArgumentPluginBase { +class GroupByNumeric extends ArgumentPluginBase { + function query($group_by = FALSE) { $this->ensure_my_table(); $field = $this->get_field(); @@ -36,4 +35,5 @@ class GroupByNumeric extends ArgumentPluginBase { function get_sort_name() { return t('Numerical', array(), array('context' => 'Sort order')); } + } diff --git a/lib/Drupal/views/Plugin/views/argument/ManyToOne.php b/lib/Drupal/views/Plugin/views/argument/ManyToOne.php index cda7cbd..a5f68d5 100644 --- a/lib/Drupal/views/Plugin/views/argument/ManyToOne.php +++ b/lib/Drupal/views/Plugin/views/argument/ManyToOne.php @@ -22,14 +22,13 @@ use Drupal\views\ManyToOneHelper; * a default argument can be provided or a summary can be shown. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "many_to_one" * ) */ class ManyToOne extends ArgumentPluginBase { + function init(&$view, &$options) { parent::init($view, $options); $this->helper = new ManyToOneHelper($this); @@ -193,4 +192,5 @@ class ManyToOne extends ArgumentPluginBase { function title_query() { return $this->value; } + } diff --git a/lib/Drupal/views/Plugin/views/argument/Null.php b/lib/Drupal/views/Plugin/views/argument/Null.php index e8449b2..a43135c 100644 --- a/lib/Drupal/views/Plugin/views/argument/Null.php +++ b/lib/Drupal/views/Plugin/views/argument/Null.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Argument handler that ignores the argument. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "null" * ) */ class Null extends ArgumentPluginBase { + function option_definition() { $options = parent::option_definition(); $options['must_not_be'] = array('default' => FALSE, 'bool' => TRUE); @@ -74,4 +73,5 @@ class Null extends ArgumentPluginBase { * from being changed in any way. */ function query($group_by = FALSE) {} + } diff --git a/lib/Drupal/views/Plugin/views/argument/Numeric.php b/lib/Drupal/views/Plugin/views/argument/Numeric.php index 2444cfd..fa005ba 100644 --- a/lib/Drupal/views/Plugin/views/argument/Numeric.php +++ b/lib/Drupal/views/Plugin/views/argument/Numeric.php @@ -14,14 +14,13 @@ use Drupal\Core\Annotation\Plugin; * break_phrase. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "numeric" * ) */ class Numeric extends ArgumentPluginBase { + /** * The operator used for the query: or|and. * @var string @@ -123,4 +122,5 @@ class Numeric extends ArgumentPluginBase { function get_sort_name() { return t('Numerical', array(), array('context' => 'Sort order')); } + } diff --git a/lib/Drupal/views/Plugin/views/argument/String.php b/lib/Drupal/views/Plugin/views/argument/String.php index 69bc15c..470a590 100644 --- a/lib/Drupal/views/Plugin/views/argument/String.php +++ b/lib/Drupal/views/Plugin/views/argument/String.php @@ -15,14 +15,13 @@ use Drupal\Core\Annotation\Plugin; * limits. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "string" * ) */ class String extends ArgumentPluginBase { + function init(&$view, &$options) { parent::init($view, $options); if (!empty($this->definition['many to one'])) { diff --git a/lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php b/lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php index a07e6ce..476cc0e 100644 --- a/lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php +++ b/lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php @@ -21,6 +21,7 @@ use Drupal\views\Plugin\views\Plugin; * The fixed argument default handler; also used as the base. */ abstract class ArgumentDefaultPluginBase extends Plugin { + /** * Return the default argument. * @@ -91,6 +92,7 @@ abstract class ArgumentDefaultPluginBase extends Plugin { * views_plugin_argument_default_fixed for a good example of this method. */ function convert_options(&$options) { } + } /** diff --git a/lib/Drupal/views/Plugin/views/argument_default/Fixed.php b/lib/Drupal/views/Plugin/views/argument_default/Fixed.php index b9979d9..cc688aa 100644 --- a/lib/Drupal/views/Plugin/views/argument_default/Fixed.php +++ b/lib/Drupal/views/Plugin/views/argument_default/Fixed.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Translation; * The fixed argument default handler. * * @ingroup views_argument_default_plugins - */ - -/** + * * @Plugin( * id = "fixed", * title = @Translation("Fixed") * ) */ class Fixed extends ArgumentDefaultPluginBase { + function option_definition() { $options = parent::option_definition(); $options['argument'] = array('default' => ''); @@ -51,8 +50,5 @@ class Fixed extends ArgumentDefaultPluginBase { $options['argument'] = $this->argument->options['default_argument_fixed']; } } -} -/** - * @} - */ +} diff --git a/lib/Drupal/views/Plugin/views/argument_default/Php.php b/lib/Drupal/views/Plugin/views/argument_default/Php.php index da988db..ec97dfb 100644 --- a/lib/Drupal/views/Plugin/views/argument_default/Php.php +++ b/lib/Drupal/views/Plugin/views/argument_default/Php.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Translation; * Default argument plugin to provide a PHP code block. * * @ingroup views_argument_default_plugins - */ - -/** + * * @Plugin( * id = "php", * title = @Translation("PHP Code") * ) */ class Php extends ArgumentDefaultPluginBase { + function option_definition() { $options = parent::option_definition(); $options['code'] = array('default' => ''); @@ -66,4 +65,5 @@ class Php extends ArgumentDefaultPluginBase { ob_end_clean(); return $result; } + } diff --git a/lib/Drupal/views/Plugin/views/argument_default/Raw.php b/lib/Drupal/views/Plugin/views/argument_default/Raw.php index 209ed34..bf360d2 100644 --- a/lib/Drupal/views/Plugin/views/argument_default/Raw.php +++ b/lib/Drupal/views/Plugin/views/argument_default/Raw.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Translation; * Default argument plugin to use the raw value from the URL. * * @ingroup views_argument_default_plugins - */ - -/** + * * @Plugin( * id = "raw", * title = @Translation("Raw value from URL") * ) */ class Raw extends ArgumentDefaultPluginBase { + function option_definition() { $options = parent::option_definition(); $options['index'] = array('default' => ''); @@ -59,4 +58,5 @@ class Raw extends ArgumentDefaultPluginBase { return $arg; } } + } diff --git a/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php b/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php index 705d621..f89c57d 100644 --- a/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php +++ b/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php @@ -96,6 +96,7 @@ abstract class ArgumentValidatorPluginBase extends Plugin { * the old value again, for example the summary. */ function process_summary_arguments(&$args) { } + } /** diff --git a/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php b/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php index c5c7cd7..fae745d 100644 --- a/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php +++ b/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php @@ -14,16 +14,16 @@ use Drupal\Core\Annotation\Translation; * Validate whether an argument is numeric or not. * * @ingroup views_argument_validate_plugins - */ - -/** + * * @Plugin( * id = "numeric", * title = @Translation("Numeric") * ) */ class Numeric extends ArgumentValidatorPluginBase { + function validate_argument($argument) { return is_numeric($argument); } + } diff --git a/lib/Drupal/views/Plugin/views/argument_validator/Php.php b/lib/Drupal/views/Plugin/views/argument_validator/Php.php index 7586f7c..94e0979 100644 --- a/lib/Drupal/views/Plugin/views/argument_validator/Php.php +++ b/lib/Drupal/views/Plugin/views/argument_validator/Php.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Translation; * Provide PHP code to validate whether or not an argument is ok. * * @ingroup views_argument_validate_plugins - */ - -/** + * * @Plugin( * id = "php", * title = @Translation("PHP Code") * ) */ class Php extends ArgumentValidatorPluginBase { + function option_definition() { $options = parent::option_definition(); $options['code'] = array('default' => ''); @@ -66,4 +65,5 @@ class Php extends ArgumentValidatorPluginBase { ob_end_clean(); return $result; } + } diff --git a/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php b/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php index 85d5d52..ecf010e 100644 --- a/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php +++ b/lib/Drupal/views/Plugin/views/cache/CachePluginBase.php @@ -22,6 +22,7 @@ use Drupal\Core\Database\Query\Select; * The base plugin to handle caching. */ abstract class CachePluginBase extends Plugin { + /** * Contains all data that should be written/read from cache. */ @@ -320,6 +321,7 @@ abstract class CachePluginBase extends Plugin { return $this->_output_key; } + } /** diff --git a/lib/Drupal/views/Plugin/views/cache/None.php b/lib/Drupal/views/Plugin/views/cache/None.php index f78f77d..050bebc 100644 --- a/lib/Drupal/views/Plugin/views/cache/None.php +++ b/lib/Drupal/views/Plugin/views/cache/None.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Caching plugin that provides no caching at all. * * @ingroup views_cache_plugins - */ - -/** + * * @Plugin( * id = "none", * title = @Translation("None"), @@ -25,6 +23,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class None extends CachePluginBase { + function cache_start() { /* do nothing */ } function summary_title() { @@ -36,4 +35,5 @@ class None extends CachePluginBase { } function cache_set($type) { } + } diff --git a/lib/Drupal/views/Plugin/views/cache/Time.php b/lib/Drupal/views/Plugin/views/cache/Time.php index 471eaae..a9260ef 100644 --- a/lib/Drupal/views/Plugin/views/cache/Time.php +++ b/lib/Drupal/views/Plugin/views/cache/Time.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Simple caching of query results for Views displays. * * @ingroup views_cache_plugins - */ - -/** + * * @Plugin( * id = "time", * title = @Translation("Time-based"), @@ -26,6 +24,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Time extends CachePluginBase { + function option_definition() { $options = parent::option_definition(); $options['results_lifespan'] = array('default' => 3600); @@ -124,4 +123,5 @@ class Time extends CachePluginBase { return CACHE_PERMANENT; } } + } diff --git a/lib/Drupal/views/Plugin/views/display/Attachment.php b/lib/Drupal/views/Plugin/views/display/Attachment.php index 2e52a5d..0c6b5a4 100644 --- a/lib/Drupal/views/Plugin/views/display/Attachment.php +++ b/lib/Drupal/views/Plugin/views/display/Attachment.php @@ -18,9 +18,7 @@ use Drupal\Core\Annotation\Translation; * the same view. They can share some information. * * @ingroup views_display_plugins - */ - -/** + * * @Plugin( * id = "attachment", * title = @Translation("Attachment"), @@ -35,6 +33,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Attachment extends DisplayPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -299,4 +298,5 @@ class Attachment extends DisplayPluginBase { function render_pager() { return !empty($this->use_pager) && $this->get_option('render_pager'); } + } diff --git a/lib/Drupal/views/Plugin/views/display/Block.php b/lib/Drupal/views/Plugin/views/display/Block.php index 70d1ce2..174d5bb 100644 --- a/lib/Drupal/views/Plugin/views/display/Block.php +++ b/lib/Drupal/views/Plugin/views/display/Block.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * The plugin that handles a block. * * @ingroup views_display_plugins - */ - -/** + * * @Plugin( * id = "block", * title = @Translation("Block"), @@ -33,6 +31,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Block extends DisplayPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -262,4 +261,5 @@ class Block extends DisplayPluginBase { ->execute(); } } + } diff --git a/lib/Drupal/views/Plugin/views/display/DefaultDisplay.php b/lib/Drupal/views/Plugin/views/display/DefaultDisplay.php index db01b41..c9d9936 100644 --- a/lib/Drupal/views/Plugin/views/display/DefaultDisplay.php +++ b/lib/Drupal/views/Plugin/views/display/DefaultDisplay.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * A plugin to handle defaults on a view. * * @ingroup views_display_plugins - */ - -/** + * * @Plugin( * id = "default", * title = @Translation("Master"), @@ -32,6 +30,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class DefaultDisplay extends DisplayPluginBase { + /** * Determine if this display is the 'default' display which contains * fallback settings @@ -75,4 +74,5 @@ class DefaultDisplay extends DisplayPluginBase { function execute() { return $this->view->render($this->display->id); } + } diff --git a/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php b/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php index 6cac47d..d0bb195 100644 --- a/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php +++ b/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php @@ -29,6 +29,7 @@ use Drupal\views\Plugin\Type\ViewsPluginManager; * basic mechanisms for different output methods. */ abstract class DisplayPluginBase extends Plugin { + /** * The top object of a view. * @@ -3092,8 +3093,8 @@ abstract class DisplayPluginBase extends Plugin { 'items per page description' => t('The number of items to display. Enter 0 for no limit.') ); } -} +} /** * @} diff --git a/lib/Drupal/views/Plugin/views/display/Embed.php b/lib/Drupal/views/Plugin/views/display/Embed.php index be15128..ffe1ae1 100644 --- a/lib/Drupal/views/Plugin/views/display/Embed.php +++ b/lib/Drupal/views/Plugin/views/display/Embed.php @@ -17,9 +17,7 @@ use Drupal\Core\Annotation\Translation; * * @todo: Wait until annotations/plugins support access mehtods. * no ui => !config('views.settings')->get('views_ui_display_embed'), - */ - -/** + * * @Plugin( * id = "embed", * title = @Translation("Embed"), @@ -33,5 +31,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Embed extends DisplayPluginBase { + // This display plugin does nothing apart from exist. + } diff --git a/lib/Drupal/views/Plugin/views/display/Feed.php b/lib/Drupal/views/Plugin/views/display/Feed.php index 6bfd130..b32d43c 100644 --- a/lib/Drupal/views/Plugin/views/display/Feed.php +++ b/lib/Drupal/views/Plugin/views/display/Feed.php @@ -17,9 +17,7 @@ use Drupal\Core\Annotation\Translation; * For the most part, feeds are page displays but with some subtle differences. * * @ingroup views_display_plugins - */ - -/** + * * @Plugin( * id = "feed", * title = @Translation("Feed"), @@ -33,6 +31,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Feed extends Page { + function init(&$view, &$display, $options = NULL) { parent::init($view, $display, $options); @@ -247,4 +246,5 @@ class Feed extends Page { function uses_link_display() { return TRUE; } + } diff --git a/lib/Drupal/views/Plugin/views/display/Page.php b/lib/Drupal/views/Plugin/views/display/Page.php index 16557b1..a4fe689 100644 --- a/lib/Drupal/views/Plugin/views/display/Page.php +++ b/lib/Drupal/views/Plugin/views/display/Page.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * The plugin that handles a full page. * * @ingroup views_display_plugins - */ - -/** + * * @Plugin( * id = "page", * title = @Translation("Page"), @@ -33,6 +31,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Page extends DisplayPluginBase { + /** * The page display has a path. */ @@ -650,4 +649,5 @@ class Page extends DisplayPluginBase { 'items per page description' => t('The number of items to display per page. Enter 0 for no limit.') ); } + } diff --git a/lib/Drupal/views/Plugin/views/display_extender/DefaultDisplayExtender.php b/lib/Drupal/views/Plugin/views/display_extender/DefaultDisplayExtender.php index a33354a..ff86e78 100644 --- a/lib/Drupal/views/Plugin/views/display_extender/DefaultDisplayExtender.php +++ b/lib/Drupal/views/Plugin/views/display_extender/DefaultDisplayExtender.php @@ -10,6 +10,8 @@ use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Translation; /** + * @todo + * * @Plugin( * id = "default", * title = @Translation("Empty display extender"), @@ -19,4 +21,5 @@ use Drupal\Core\Annotation\Translation; * ) */ class DefaultDisplayExtender extends DisplayExtenderPluginBase { + } diff --git a/lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php b/lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php index beb4804..107c91e 100644 --- a/lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php +++ b/lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php @@ -15,16 +15,13 @@ use Drupal\Core\Annotation\Translation; * * @ingroup views_display_plugins */ - -/** - */ abstract class DisplayExtenderPluginBase extends Plugin { + function init(&$view, &$display) { $this->view = $view; $this->display = $display; } - /** * Provide a form to edit options for this plugin. */ @@ -67,4 +64,5 @@ abstract class DisplayExtenderPluginBase extends Plugin { * and what items each section contains. */ function defaultable_sections(&$sections, $section = NULL) { } + } diff --git a/lib/Drupal/views/Plugin/views/exposed_form/Basic.php b/lib/Drupal/views/Plugin/views/exposed_form/Basic.php index b5c8bda..9d56944 100644 --- a/lib/Drupal/views/Plugin/views/exposed_form/Basic.php +++ b/lib/Drupal/views/Plugin/views/exposed_form/Basic.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Exposed form plugin that provides a basic exposed form. * * @ingroup views_exposed_form_plugins - */ - -/** + * * @Plugin( * id = "basic", * title = @Translation("Basic"), @@ -25,4 +23,6 @@ use Drupal\Core\Annotation\Translation; * help_topic = "exposed-form-basic" * ) */ -class Basic extends ExposedFormPluginBase { } +class Basic extends ExposedFormPluginBase { + +} diff --git a/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php b/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php index 4976ba2..9205fce 100644 --- a/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php +++ b/lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php @@ -323,6 +323,7 @@ abstract class ExposedFormPluginBase extends Plugin { $form_state['values'] = array(); } + } /** diff --git a/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php b/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php index 831042f..5f7d9f7 100644 --- a/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php +++ b/lib/Drupal/views/Plugin/views/exposed_form/InputRequired.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Exposed form plugin that provides an exposed form with required input. * * @ingroup views_exposed_form_plugins - */ - -/** + * * @Plugin( * id = "input_required", * title = @Translation("Input required"), diff --git a/lib/Drupal/views/Plugin/views/field/Boolean.php b/lib/Drupal/views/Plugin/views/field/Boolean.php index fe2de17..018724e 100644 --- a/lib/Drupal/views/Plugin/views/field/Boolean.php +++ b/lib/Drupal/views/Plugin/views/field/Boolean.php @@ -23,14 +23,13 @@ use Drupal\Core\Annotation\Plugin; * @endcode * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "boolean" * ) */ class Boolean extends FieldPluginBase { + function option_definition() { $options = parent::option_definition(); $options['type'] = array('default' => 'yes-no'); @@ -86,4 +85,5 @@ class Boolean extends FieldPluginBase { return $value ? $this->formats['yes-no'][0] : $this->formats['yes-no'][1]; } } + } diff --git a/lib/Drupal/views/Plugin/views/field/Broken.php b/lib/Drupal/views/Plugin/views/field/Broken.php index 37f135c..e05ab06 100644 --- a/lib/Drupal/views/Plugin/views/field/Broken.php +++ b/lib/Drupal/views/Plugin/views/field/Broken.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * A special handler to take the place of missing or broken handlers. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "broken" * ) */ class Broken extends FieldPluginBase { + function ui_name($short = FALSE) { return t('Broken/missing handler'); } @@ -37,4 +36,5 @@ class Broken extends FieldPluginBase { * Determine if the handler is considered 'broken' */ function broken() { return TRUE; } + } diff --git a/lib/Drupal/views/Plugin/views/field/ContextualLinks.php b/lib/Drupal/views/Plugin/views/field/ContextualLinks.php index c8d9649..f8a2156 100644 --- a/lib/Drupal/views/Plugin/views/field/ContextualLinks.php +++ b/lib/Drupal/views/Plugin/views/field/ContextualLinks.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Provides a handler that adds contextual links. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "contextual_links" * ) */ class ContextualLinks extends FieldPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -113,4 +112,5 @@ class ContextualLinks extends FieldPluginBase { } function query() { } + } diff --git a/lib/Drupal/views/Plugin/views/field/Counter.php b/lib/Drupal/views/Plugin/views/field/Counter.php index e7bfd4c..64bacd5 100644 --- a/lib/Drupal/views/Plugin/views/field/Counter.php +++ b/lib/Drupal/views/Plugin/views/field/Counter.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Field handler to show a counter of the current row. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "counter" * ) */ class Counter extends FieldPluginBase { + function option_definition() { $options = parent::option_definition(); $options['counter_start'] = array('default' => 1); @@ -57,4 +56,5 @@ class Counter extends FieldPluginBase { return $count; } + } diff --git a/lib/Drupal/views/Plugin/views/field/Custom.php b/lib/Drupal/views/Plugin/views/field/Custom.php index 8cc51b0..f59932e 100644 --- a/lib/Drupal/views/Plugin/views/field/Custom.php +++ b/lib/Drupal/views/Plugin/views/field/Custom.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * A handler to provide a field that is completely custom by the administrator. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "custom" * ) */ class Custom extends FieldPluginBase { + function query() { // do nothing -- to override the parent query. } @@ -48,4 +47,5 @@ class Custom extends FieldPluginBase { // Return the text, so the code never thinks the value is empty. return $this->options['alter']['text']; } + } diff --git a/lib/Drupal/views/Plugin/views/field/Date.php b/lib/Drupal/views/Plugin/views/field/Date.php index 7d5e2f7..3155639 100644 --- a/lib/Drupal/views/Plugin/views/field/Date.php +++ b/lib/Drupal/views/Plugin/views/field/Date.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * A handler to provide proper displays for dates. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "date" * ) */ class Date extends FieldPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -117,4 +116,5 @@ class Date extends FieldPluginBase { } } } + } diff --git a/lib/Drupal/views/Plugin/views/field/Entity.php b/lib/Drupal/views/Plugin/views/field/Entity.php index f12a16b..4c36aeb 100644 --- a/lib/Drupal/views/Plugin/views/field/Entity.php +++ b/lib/Drupal/views/Plugin/views/field/Entity.php @@ -19,10 +19,8 @@ use Drupal\Core\Annotation\Plugin; * @code views_entity_{ENTITY_TYPE} @endcode. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "entity" * ) */ @@ -111,4 +109,5 @@ class Entity extends FieldPluginBase { } return FALSE; } + } diff --git a/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php index f847fd0..fc4884b 100644 --- a/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php +++ b/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php @@ -47,13 +47,7 @@ define('VIEWS_HANDLER_RENDER_TEXT_PHASE_EMPTY', 2); * * @ingroup views_field_handlers */ - -/** - * @plugin( - * id = "standard" - * ) - */ -class FieldPluginBase extends Handler { +abstract class FieldPluginBase extends Handler { var $field_alias = 'unknown'; var $aliases = array(); diff --git a/lib/Drupal/views/Plugin/views/field/FileSize.php b/lib/Drupal/views/Plugin/views/field/FileSize.php index 79bab19..d59b5f0 100644 --- a/lib/Drupal/views/Plugin/views/field/FileSize.php +++ b/lib/Drupal/views/Plugin/views/field/FileSize.php @@ -11,14 +11,13 @@ use Drupal\Core\Annotation\Plugin; * Render a numeric value as a size. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "file_size" * ) */ class FileSize extends FieldPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -54,4 +53,5 @@ class FileSize extends FieldPluginBase { return ''; } } + } diff --git a/lib/Drupal/views/Plugin/views/field/MachineName.php b/lib/Drupal/views/Plugin/views/field/MachineName.php index ca3ca83..c8dc649 100644 --- a/lib/Drupal/views/Plugin/views/field/MachineName.php +++ b/lib/Drupal/views/Plugin/views/field/MachineName.php @@ -16,14 +16,13 @@ use Drupal\Core\Annotation\Plugin; * Definition items: * - options callback: The function to call in order to generate the value options. If omitted, the options 'Yes' and 'No' will be used. * - options arguments: An array of arguments to pass to the options callback. - */ - -/** - * @plugin( + * + * @Plugin( * id = "machine_name" * ) */ class MachineName extends FieldPluginBase { + /** * @var array Stores the available options. */ @@ -80,4 +79,5 @@ class MachineName extends FieldPluginBase { return $result; } + } diff --git a/lib/Drupal/views/Plugin/views/field/Markup.php b/lib/Drupal/views/Plugin/views/field/Markup.php index 003eb92..e13d560 100644 --- a/lib/Drupal/views/Plugin/views/field/Markup.php +++ b/lib/Drupal/views/Plugin/views/field/Markup.php @@ -19,14 +19,13 @@ use Drupal\Core\Annotation\Plugin; * which goes with the 'body' field. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "markup" * ) */ class Markup extends FieldPluginBase { + /** * Constructor; calls to base object constructor. */ @@ -66,4 +65,5 @@ class Markup extends FieldPluginBase { return 'div'; } + } diff --git a/lib/Drupal/views/Plugin/views/field/Math.php b/lib/Drupal/views/Plugin/views/field/Math.php index a53a86c..202fdf0 100644 --- a/lib/Drupal/views/Plugin/views/field/Math.php +++ b/lib/Drupal/views/Plugin/views/field/Math.php @@ -18,14 +18,13 @@ use Drupal\Core\Annotation\Plugin; * will be assumed to be integer. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "math" * ) */ class Math extends Numeric { + function option_definition() { $options = parent::option_definition(); $options['expression'] = array('default' => ''); @@ -91,4 +90,5 @@ class Math extends Numeric { } function query() { } + } diff --git a/lib/Drupal/views/Plugin/views/field/Numeric.php b/lib/Drupal/views/Plugin/views/field/Numeric.php index b769f94..bfafee5 100644 --- a/lib/Drupal/views/Plugin/views/field/Numeric.php +++ b/lib/Drupal/views/Plugin/views/field/Numeric.php @@ -17,14 +17,13 @@ use Drupal\Core\Annotation\Plugin; * will be assumed to be integer. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "numeric" * ) */ class Numeric extends FieldPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -156,4 +155,5 @@ class Numeric extends FieldPluginBase { . $this->sanitize_value($value) . $this->sanitize_value($this->options['suffix'], 'xss'); } + } diff --git a/lib/Drupal/views/Plugin/views/field/PrerenderList.php b/lib/Drupal/views/Plugin/views/field/PrerenderList.php index 061efce..3700d29 100644 --- a/lib/Drupal/views/Plugin/views/field/PrerenderList.php +++ b/lib/Drupal/views/Plugin/views/field/PrerenderList.php @@ -18,14 +18,13 @@ use Drupal\Core\Annotation\Plugin; * Items to render should be in a list in $this->items * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "prerender_list" * ) */ class PrerenderList extends FieldPluginBase { + /** * Stores all items which are used to render the items. * It should be keyed first by the id of the base table, for example nid. @@ -169,4 +168,5 @@ class PrerenderList extends FieldPluginBase { // this method to determine if it needs to render items as a list. return method_exists($this, 'render_item'); } + } diff --git a/lib/Drupal/views/Plugin/views/field/Serialized.php b/lib/Drupal/views/Plugin/views/field/Serialized.php index 4d24874..e94c97d 100644 --- a/lib/Drupal/views/Plugin/views/field/Serialized.php +++ b/lib/Drupal/views/Plugin/views/field/Serialized.php @@ -13,10 +13,8 @@ use Drupal\Core\Annotation\Plugin; * Field handler to show data of serialized fields. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "serialized" * ) */ @@ -76,4 +74,5 @@ class Serialized extends FieldPluginBase { return $value; } + } diff --git a/lib/Drupal/views/Plugin/views/field/Standard.php b/lib/Drupal/views/Plugin/views/field/Standard.php new file mode 100644 index 0000000..52e7b5c --- /dev/null +++ b/lib/Drupal/views/Plugin/views/field/Standard.php @@ -0,0 +1,23 @@ +{$this->field_alias}; return format_interval($value, isset($this->options['granularity']) ? $this->options['granularity'] : 2); } + } diff --git a/lib/Drupal/views/Plugin/views/field/Url.php b/lib/Drupal/views/Plugin/views/field/Url.php index 9e3bd6f..b3b6a32 100644 --- a/lib/Drupal/views/Plugin/views/field/Url.php +++ b/lib/Drupal/views/Plugin/views/field/Url.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Field handler to provide simple renderer that turns a URL into a clickable link. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "url" * ) */ class Url extends FieldPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -50,4 +49,5 @@ class Url extends FieldPluginBase { return $this->sanitize_value($value, 'url'); } } + } diff --git a/lib/Drupal/views/Plugin/views/field/Xss.php b/lib/Drupal/views/Plugin/views/field/Xss.php index 316cd8d..8b3d69b 100644 --- a/lib/Drupal/views/Plugin/views/field/Xss.php +++ b/lib/Drupal/views/Plugin/views/field/Xss.php @@ -12,16 +12,16 @@ use Drupal\Core\Annotation\Plugin; * A handler to run a field through simple XSS filtering. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "xss" * ) */ class Xss extends FieldPluginBase { + function render($values) { $value = $this->get_value($values); return $this->sanitize_value($value, 'xss'); } + } diff --git a/lib/Drupal/views/Plugin/views/filter/BooleanOperator.php b/lib/Drupal/views/Plugin/views/filter/BooleanOperator.php index b9d69e6..739c975 100644 --- a/lib/Drupal/views/Plugin/views/filter/BooleanOperator.php +++ b/lib/Drupal/views/Plugin/views/filter/BooleanOperator.php @@ -24,10 +24,8 @@ use Drupal\Core\Annotation\Plugin; * This might be helpful for performance reasons. * * @ingroup views_filter_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "boolean" * ) */ diff --git a/lib/Drupal/views/Plugin/views/filter/BooleanOperatorString.php b/lib/Drupal/views/Plugin/views/filter/BooleanOperatorString.php index 5838e44..cdda542 100644 --- a/lib/Drupal/views/Plugin/views/filter/BooleanOperatorString.php +++ b/lib/Drupal/views/Plugin/views/filter/BooleanOperatorString.php @@ -19,14 +19,13 @@ use Drupal\Core\Annotation\Plugin; * - label: (REQUIRED) The label for the checkbox. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "boolean_string" * ) */ class BooleanOperatorString extends BooleanOperator { + function query() { $this->ensure_my_table(); $where = "$this->table_alias.$this->real_field "; @@ -42,4 +41,5 @@ class BooleanOperatorString extends BooleanOperator { } $this->query->add_where($this->options['group'], $where); } + } diff --git a/lib/Drupal/views/Plugin/views/filter/Broken.php b/lib/Drupal/views/Plugin/views/filter/Broken.php index a9bf22c..860fb7e 100644 --- a/lib/Drupal/views/Plugin/views/filter/Broken.php +++ b/lib/Drupal/views/Plugin/views/filter/Broken.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * A special handler to take the place of missing or broken handlers. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "broken" * ) */ class Broken extends FilterPluginBase { + function ui_name($short = FALSE) { return t('Broken/missing handler'); } @@ -37,4 +36,5 @@ class Broken extends FilterPluginBase { * Determine if the handler is considered 'broken' */ function broken() { return TRUE; } + } diff --git a/lib/Drupal/views/Plugin/views/filter/Combine.php b/lib/Drupal/views/Plugin/views/filter/Combine.php index d5fe089..e0e99c9 100644 --- a/lib/Drupal/views/Plugin/views/filter/Combine.php +++ b/lib/Drupal/views/Plugin/views/filter/Combine.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Filter handler which allows to search on multiple fields. * * @ingroup views_field_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "combine" * ) */ class Combine extends String { + /** * @var views_plugin_query_default */ @@ -144,4 +143,5 @@ class Combine extends String { $this->query->add_where_expression($this->options['group'], "$field $operator"); } + } diff --git a/lib/Drupal/views/Plugin/views/filter/Date.php b/lib/Drupal/views/Plugin/views/filter/Date.php index ddc3ad0..00e6168 100644 --- a/lib/Drupal/views/Plugin/views/filter/Date.php +++ b/lib/Drupal/views/Plugin/views/filter/Date.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Filter to handle dates stored as a timestamp. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "date" * ) */ class Date extends Numeric { + function option_definition() { $options = parent::option_definition(); @@ -162,4 +161,5 @@ class Date extends Numeric { // It is necessary to do it this way because $value is a formula when using an offset. $this->query->add_where_expression($this->options['group'], "$field $this->operator $value"); } + } diff --git a/lib/Drupal/views/Plugin/views/filter/Equality.php b/lib/Drupal/views/Plugin/views/filter/Equality.php index b21a39e..c357801 100644 --- a/lib/Drupal/views/Plugin/views/filter/Equality.php +++ b/lib/Drupal/views/Plugin/views/filter/Equality.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Simple filter to handle equal to / not equal to filters * * @ingroup views_filter_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "equality" * ) */ class Equality extends FilterPluginBase { + // exposed filter options var $always_multiple = TRUE; @@ -52,4 +51,5 @@ class Equality extends FilterPluginBase { } } } + } diff --git a/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php b/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php index 47b686a..007bfc0 100644 --- a/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php +++ b/lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php @@ -36,13 +36,8 @@ use Drupal\Core\Annotation\Plugin; * * @ingroup views_filter_handlers */ +abstract class FilterPluginBase extends Handler { -/** - * @Plugin( - * id = "standard" - * ) - */ -class FilterPluginBase extends Handler { /** * Contains the actual value of the field,either configured in the views ui * or entered in the exposed filters. @@ -722,6 +717,7 @@ class FilterPluginBase extends Handler { function can_group() { return TRUE; } + } /** diff --git a/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php b/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php index bdd84bb..43891ea 100644 --- a/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php +++ b/lib/Drupal/views/Plugin/views/filter/GroupByNumeric.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * Simple filter to handle greater than/less than filters * * @ingroup views_filter_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "groupby_numeric" * ) */ class GroupByNumeric extends Numeric { + function query() { $this->ensure_my_table(); $field = $this->get_field(); @@ -63,4 +62,5 @@ class GroupByNumeric extends Numeric { } function can_group() { return FALSE; } + } diff --git a/lib/Drupal/views/Plugin/views/filter/InOperator.php b/lib/Drupal/views/Plugin/views/filter/InOperator.php index cef4c9c..c659cc3 100644 --- a/lib/Drupal/views/Plugin/views/filter/InOperator.php +++ b/lib/Drupal/views/Plugin/views/filter/InOperator.php @@ -17,14 +17,13 @@ use Drupal\Core\Annotation\Plugin; * - options arguments: An array of arguments to pass to the options callback. * * @ingroup views_filter_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "in_operator" * ) */ class InOperator extends FilterPluginBase { + var $value_form_type = 'checkboxes'; /** @@ -435,4 +434,5 @@ class InOperator extends FilterPluginBase { } return $errors; } + } diff --git a/lib/Drupal/views/Plugin/views/filter/ManyToOne.php b/lib/Drupal/views/Plugin/views/filter/ManyToOne.php index 531e303..b4ce48a 100644 --- a/lib/Drupal/views/Plugin/views/filter/ManyToOne.php +++ b/lib/Drupal/views/Plugin/views/filter/ManyToOne.php @@ -19,14 +19,13 @@ use Drupal\Core\Annotation\Plugin; * to provide something that isn't just a select list. * * @ingroup views_filter_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "many_to_one" * ) */ class ManyToOne extends InOperator { + /** * @var Drupal\views\ManyToOneHelper * @@ -133,4 +132,5 @@ class ManyToOne extends InOperator { } $this->helper->add_filter(); } + } diff --git a/lib/Drupal/views/Plugin/views/filter/Numeric.php b/lib/Drupal/views/Plugin/views/filter/Numeric.php index 427c677..bee2625 100644 --- a/lib/Drupal/views/Plugin/views/filter/Numeric.php +++ b/lib/Drupal/views/Plugin/views/filter/Numeric.php @@ -14,15 +14,15 @@ use Drupal\Core\Annotation\Plugin; * Simple filter to handle greater than/less than filters * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "numeric" * ) */ class Numeric extends FilterPluginBase { + var $always_multiple = TRUE; + function option_definition() { $options = parent::option_definition(); @@ -339,4 +339,5 @@ class Numeric extends FilterPluginBase { return $rc; } + } diff --git a/lib/Drupal/views/Plugin/views/filter/Standard.php b/lib/Drupal/views/Plugin/views/filter/Standard.php new file mode 100644 index 0000000..e86dc12 --- /dev/null +++ b/lib/Drupal/views/Plugin/views/filter/Standard.php @@ -0,0 +1,23 @@ +options['offset'])) { return format_plural($this->options['items_per_page'], '@count item, skip @skip', 'Paged, @count items, skip @skip', array('@count' => $this->options['items_per_page'], '@skip' => $this->options['offset'])); @@ -443,4 +442,5 @@ class Full extends PagerPluginBase { } } } + } diff --git a/lib/Drupal/views/Plugin/views/pager/Mini.php b/lib/Drupal/views/Plugin/views/pager/Mini.php index b68ba1a..d1c3434 100644 --- a/lib/Drupal/views/Plugin/views/pager/Mini.php +++ b/lib/Drupal/views/Plugin/views/pager/Mini.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * The plugin to handle full pager. * * @ingroup views_pager_plugins - */ - -/** + * * @Plugin( * id = "mini", * title = @Translation("Paged output, mini pager"), @@ -27,6 +25,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Mini extends PagerPluginBase { + function summary_title() { if (!empty($this->options['offset'])) { return format_plural($this->options['items_per_page'], 'Mini pager, @count item, skip @skip', 'Mini pager, @count items, skip @skip', array('@count' => $this->options['items_per_page'], '@skip' => $this->options['offset'])); @@ -39,4 +38,5 @@ class Mini extends PagerPluginBase { return theme($pager_theme, array( 'parameters' => $input, 'element' => $this->options['id'])); } + } diff --git a/lib/Drupal/views/Plugin/views/pager/None.php b/lib/Drupal/views/Plugin/views/pager/None.php index 9994071..28bba40 100644 --- a/lib/Drupal/views/Plugin/views/pager/None.php +++ b/lib/Drupal/views/Plugin/views/pager/None.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Plugin for views without pagers. * * @ingroup views_pager_plugins - */ - -/** + * * @Plugin( * id = "none", * title = @Translation("Display all items"), @@ -88,4 +86,5 @@ class None extends PagerPluginBase { $this->view->query->set_offset($this->options['offset']); } } + } diff --git a/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php b/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php index 8e108fb..605c9f7 100644 --- a/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php +++ b/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php @@ -21,7 +21,9 @@ use Drupal\views\Plugin\views\Plugin; * The base plugin to handle pager. */ abstract class PagerPluginBase extends Plugin { + var $current_page = NULL; + var $total_items = 0; /** @@ -233,6 +235,7 @@ abstract class PagerPluginBase extends Plugin { function offset_exposed() { return FALSE; } + } /** diff --git a/lib/Drupal/views/Plugin/views/pager/Some.php b/lib/Drupal/views/Plugin/views/pager/Some.php index 61de7d4..6e92c3b 100644 --- a/lib/Drupal/views/Plugin/views/pager/Some.php +++ b/lib/Drupal/views/Plugin/views/pager/Some.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Plugin for views without pagers. * * @ingroup views_pager_plugins - */ - -/** + * * @Plugin( * id = "some", * title = @Translation("Display a specified number of items"), @@ -27,6 +25,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Some extends PagerPluginBase { + function summary_title() { if (!empty($this->options['offset'])) { return format_plural($this->options['items_per_page'], '@count item, skip @skip', '@count items, skip @skip', array('@count' => $this->options['items_per_page'], '@skip' => $this->options['offset'])); @@ -75,4 +74,5 @@ class Some extends PagerPluginBase { $this->view->query->set_limit($this->options['items_per_page']); $this->view->query->set_offset($this->options['offset']); } + } diff --git a/lib/Drupal/views/Plugin/views/query/QueryInterface.php b/lib/Drupal/views/Plugin/views/query/QueryInterface.php index 8b014df..54714c8 100644 --- a/lib/Drupal/views/Plugin/views/query/QueryInterface.php +++ b/lib/Drupal/views/Plugin/views/query/QueryInterface.php @@ -8,6 +8,9 @@ namespace Drupal\views\Plugin\views\query; use Drupal\views\Plugin\views\PluginInterface; +/** + * @todo. + */ interface QueryInterface extends PluginInterface { } diff --git a/lib/Drupal/views/Plugin/views/query/QueryPluginBase.php b/lib/Drupal/views/Plugin/views/query/QueryPluginBase.php index ce86581..bf4d0b9 100644 --- a/lib/Drupal/views/Plugin/views/query/QueryPluginBase.php +++ b/lib/Drupal/views/Plugin/views/query/QueryPluginBase.php @@ -8,7 +8,11 @@ namespace Drupal\views\Plugin\views\query; use Drupal\views\Plugin\views\Plugin; +/** + * @todo. + */ abstract class QueryPluginBase extends Plugin implements QueryInterface { + /** * A pager plugin that should be provided by the display. * @@ -170,4 +174,5 @@ abstract class QueryPluginBase extends Plugin implements QueryInterface { function get_result_entities($results, $relationship = NULL) { return FALSE; } + } diff --git a/lib/Drupal/views/Plugin/views/query/Sql.php b/lib/Drupal/views/Plugin/views/query/Sql.php index 4e872d5..1a5e3cc 100644 --- a/lib/Drupal/views/Plugin/views/query/Sql.php +++ b/lib/Drupal/views/Plugin/views/query/Sql.php @@ -14,6 +14,8 @@ use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Translation; /** + * @todo. + * * @Plugin( * id = "views_query", * title = @Translation("SQL Query"), diff --git a/lib/Drupal/views/Plugin/views/relationship/Broken.php b/lib/Drupal/views/Plugin/views/relationship/Broken.php index 8102d10..a4c64d1 100644 --- a/lib/Drupal/views/Plugin/views/relationship/Broken.php +++ b/lib/Drupal/views/Plugin/views/relationship/Broken.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * A special handler to take the place of missing or broken handlers. * * @ingroup views_relationship_handlers - */ - -/** + * * @Plugin( * id = "broken" * ) diff --git a/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php b/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php index 03876ad..78ba5e0 100644 --- a/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php +++ b/lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php @@ -59,10 +59,8 @@ use Drupal\Core\Annotation\Plugin; * in the same way as node_comment_statistics. * * @ingroup views_relationship_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "groupwise_max" * ) */ @@ -391,4 +389,5 @@ class GroupwiseMax extends RelationshipPluginBase { $this->alias = $this->query->add_relationship($alias, $join, $this->definition['base'], $this->relationship); } + } diff --git a/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php b/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php index 2b72b4a..deef3f4 100644 --- a/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php +++ b/lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php @@ -41,13 +41,8 @@ use Drupal\Core\Annotation\Plugin; * * @ingroup views_relationship_handlers */ +abstract class RelationshipPluginBase extends Handler { -/** - * @Plugin( - * id = "standard" - * ) - */ -class RelationshipPluginBase extends Handler { /** * Init handler to let relationships live on tables other than * the table they operate on. @@ -167,6 +162,7 @@ class RelationshipPluginBase extends Handler { function use_group_by() { return FALSE; } + } /** diff --git a/lib/Drupal/views/Plugin/views/relationship/Standard.php b/lib/Drupal/views/Plugin/views/relationship/Standard.php new file mode 100644 index 0000000..592c6f2 --- /dev/null +++ b/lib/Drupal/views/Plugin/views/relationship/Standard.php @@ -0,0 +1,23 @@ + isset($this->field_alias) ? $this->field_alias : '', )); } + } /** diff --git a/lib/Drupal/views/Plugin/views/row/RssFields.php b/lib/Drupal/views/Plugin/views/row/RssFields.php index d9e4129..d4246ba 100644 --- a/lib/Drupal/views/Plugin/views/row/RssFields.php +++ b/lib/Drupal/views/Plugin/views/row/RssFields.php @@ -12,9 +12,7 @@ use Drupal\Core\Annotation\Translation; /** * Renders an RSS item based on fields. - */ - -/** + * * @Plugin( * id = "rss_fields", * title = @Translation("Fields"), @@ -27,6 +25,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class RssFields extends RowPluginBase { + function option_definition() { $options = parent::option_definition(); $options['title_field'] = array('default' => ''); diff --git a/lib/Drupal/views/Plugin/views/sort/Broken.php b/lib/Drupal/views/Plugin/views/sort/Broken.php index 6772330..5cdbdc9 100644 --- a/lib/Drupal/views/Plugin/views/sort/Broken.php +++ b/lib/Drupal/views/Plugin/views/sort/Broken.php @@ -13,14 +13,13 @@ use Drupal\Core\Annotation\Plugin; * A special handler to take the place of missing or broken handlers. * * @ingroup views_sort_handlers - */ - -/** + * * @Plugin( * id = "broken" * ) */ class Broken extends SortPluginBase { + function ui_name($short = FALSE) { return t('Broken/missing handler'); } @@ -37,4 +36,5 @@ class Broken extends SortPluginBase { * Determine if the handler is considered 'broken' */ function broken() { return TRUE; } + } diff --git a/lib/Drupal/views/Plugin/views/sort/Date.php b/lib/Drupal/views/Plugin/views/sort/Date.php index f972030..279ddc0 100644 --- a/lib/Drupal/views/Plugin/views/sort/Date.php +++ b/lib/Drupal/views/Plugin/views/sort/Date.php @@ -18,9 +18,9 @@ use Drupal\Core\Annotation\Plugin; * @Plugin( * id = "date" * ) - * */ class Date extends SortPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -78,4 +78,5 @@ class Date extends SortPluginBase { // Add the field. $this->query->add_orderby(NULL, $formula, $this->options['order'], $this->table_alias . '_' . $this->field . '_' . $this->options['granularity']); } + } diff --git a/lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php b/lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php index 50b1f40..824bfcd 100644 --- a/lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php +++ b/lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php @@ -17,6 +17,7 @@ use Drupal\Core\Annotation\Plugin; * ) */ class GroupByNumeric extends SortPluginBase { + function init(&$view, &$options) { parent::init($view, $options); @@ -41,4 +42,5 @@ class GroupByNumeric extends SortPluginBase { function ui_name($short = FALSE) { return $this->get_field(parent::ui_name($short)); } + } diff --git a/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php b/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php index 3c196ac..4592208 100644 --- a/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php +++ b/lib/Drupal/views/Plugin/views/sort/MenuHierarchy.php @@ -25,6 +25,7 @@ use Drupal\Core\Annotation\Plugin; * ) */ class MenuHierarchy extends SortPluginBase { + function option_definition() { $options = parent::option_definition(); $options['sort_within_level'] = array('default' => FALSE); @@ -59,4 +60,5 @@ class MenuHierarchy extends SortPluginBase { $this->query->add_orderby($this->table_alias, $this->field . $i, $this->options['order']); } } + } diff --git a/lib/Drupal/views/Plugin/views/sort/Random.php b/lib/Drupal/views/Plugin/views/sort/Random.php index a8a818b..076e5ff 100644 --- a/lib/Drupal/views/Plugin/views/sort/Random.php +++ b/lib/Drupal/views/Plugin/views/sort/Random.php @@ -17,6 +17,7 @@ use Drupal\Core\Annotation\Plugin; * ) */ class Random extends SortPluginBase { + function query() { $this->query->add_orderby('rand'); } @@ -25,4 +26,5 @@ class Random extends SortPluginBase { parent::options_form($form, $form_state); $form['order']['#access'] = FALSE; } + } diff --git a/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php b/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php index 42ae291..f398861 100644 --- a/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php +++ b/lib/Drupal/views/Plugin/views/sort/SortPluginBase.php @@ -16,19 +16,12 @@ use Drupal\Core\Annotation\Plugin; * Handlers to tell Views how to sort queries. */ - /** * Base sort handler that has no options and performs a simple sort. * * @ingroup views_sort_handlers */ - -/** - * @Plugin( - * id = "standard" - * ) - */ -class SortPluginBase extends Handler { +abstract class SortPluginBase extends Handler { /** * Determine if a sort can be exposed. @@ -220,6 +213,7 @@ class SortPluginBase extends Handler { 'label' => $this->definition['title'], ); } + } /** diff --git a/lib/Drupal/views/Plugin/views/sort/Standard.php b/lib/Drupal/views/Plugin/views/sort/Standard.php new file mode 100644 index 0000000..d5767fe --- /dev/null +++ b/lib/Drupal/views/Plugin/views/sort/Standard.php @@ -0,0 +1,23 @@ + $rows )); } + } diff --git a/lib/Drupal/views/Plugin/views/style/Grid.php b/lib/Drupal/views/Plugin/views/style/Grid.php index d3b873e..b5146c9 100644 --- a/lib/Drupal/views/Plugin/views/style/Grid.php +++ b/lib/Drupal/views/Plugin/views/style/Grid.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Style plugin to render each item in a grid cell. * * @ingroup views_style_plugins - */ - -/** + * * @Plugin( * id = "grid", * title = @Translation("Grid"), @@ -31,6 +29,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Grid extends StylePluginBase { + /** * Set default options */ @@ -79,4 +78,5 @@ class Grid extends StylePluginBase { '#default_value' => $this->options['summary'], ); } + } diff --git a/lib/Drupal/views/Plugin/views/style/HtmlList.php b/lib/Drupal/views/Plugin/views/style/HtmlList.php index 9c15f65..9760a94 100644 --- a/lib/Drupal/views/Plugin/views/style/HtmlList.php +++ b/lib/Drupal/views/Plugin/views/style/HtmlList.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Style plugin to render each item in an ordered or unordered list. * * @ingroup views_style_plugins - */ - -/** + * * @Plugin( * id = "html_list", * title = @Translation("HTML List"), @@ -30,6 +28,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class HtmlList extends StylePluginBase { + /** * Set default options */ @@ -69,4 +68,5 @@ class HtmlList extends StylePluginBase { '#default_value' => $this->options['class'], ); } + } diff --git a/lib/Drupal/views/Plugin/views/style/JumpMenu.php b/lib/Drupal/views/Plugin/views/style/JumpMenu.php index d26690f..309992d 100644 --- a/lib/Drupal/views/Plugin/views/style/JumpMenu.php +++ b/lib/Drupal/views/Plugin/views/style/JumpMenu.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Style plugin to render each item as a row in a table. * * @ingroup views_style_plugins - */ - -/** + * * @Plugin( * id = "jump_menu", * title = @Translation("Jump menu"), @@ -30,6 +28,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class JumpMenu extends StylePluginBase { + function option_definition() { $options = parent::option_definition(); @@ -166,4 +165,5 @@ class JumpMenu extends StylePluginBase { $options = array(); $fields = $this->rendered_fields; } + } diff --git a/lib/Drupal/views/Plugin/views/style/JumpMenuSummary.php b/lib/Drupal/views/Plugin/views/style/JumpMenuSummary.php index 4b5ddf4..dfc644f 100644 --- a/lib/Drupal/views/Plugin/views/style/JumpMenuSummary.php +++ b/lib/Drupal/views/Plugin/views/style/JumpMenuSummary.php @@ -14,8 +14,7 @@ use Drupal\Core\Annotation\Translation; * The default style plugin for summaries. * * @ingroup views_style_plugins - */ -/** + * * @Plugin( * id = "jump_menu_summary", * title = @Translation("Jump menu"), @@ -26,8 +25,8 @@ use Drupal\Core\Annotation\Translation; * help_topic = "style-summary-jump-menu" * ) */ - class JumpMenuSummary extends DefaultSummary { + function option_definition() { $options = parent::option_definition(); @@ -143,4 +142,5 @@ class JumpMenuSummary extends DefaultSummary { $form = drupal_get_form('ctools_jump_menu', $options, $settings); return drupal_render($form); } + } diff --git a/lib/Drupal/views/Plugin/views/style/Rss.php b/lib/Drupal/views/Plugin/views/style/Rss.php index 22da628..83fdd2c 100644 --- a/lib/Drupal/views/Plugin/views/style/Rss.php +++ b/lib/Drupal/views/Plugin/views/style/Rss.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Default style plugin to render an RSS feed. * * @ingroup views_style_plugins - */ - -/** + * * @Plugin( * id = "rss", * title = @Translation("RSS Feed"), @@ -29,6 +27,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Rss extends StylePluginBase { + function attach_to($display_id, $path, $title) { $display = $this->view->display[$display_id]->handler; $url_options = array(); @@ -138,4 +137,5 @@ class Rss extends StylePluginBase { unset($this->view->row_index); return $output; } + } diff --git a/lib/Drupal/views/Plugin/views/style/StylePluginBase.php b/lib/Drupal/views/Plugin/views/style/StylePluginBase.php index e848834..3d7b9d2 100644 --- a/lib/Drupal/views/Plugin/views/style/StylePluginBase.php +++ b/lib/Drupal/views/Plugin/views/style/StylePluginBase.php @@ -29,6 +29,7 @@ use Drupal\Core\Annotation\Translation; * Base class to define a style plugin handler. */ abstract class StylePluginBase extends ViewsPlugin { + /** * Store all available tokens row rows. */ @@ -601,6 +602,7 @@ abstract class StylePluginBase extends ViewsPlugin { $this->row_plugin->query(); } } + } /** diff --git a/lib/Drupal/views/Plugin/views/style/Table.php b/lib/Drupal/views/Plugin/views/style/Table.php index 29b6b9c..4c1a14b 100644 --- a/lib/Drupal/views/Plugin/views/style/Table.php +++ b/lib/Drupal/views/Plugin/views/style/Table.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * Style plugin to render each item as a row in a table. * * @ingroup views_style_plugins - */ - -/** + * * @Plugin( * id = "table", * title = @Translation("Table"), @@ -337,4 +335,5 @@ class Table extends StylePluginBase { function even_empty() { return parent::even_empty() || !empty($this->options['empty_table']); } + } diff --git a/lib/Drupal/views/Plugin/views/style/UnformattedSummary.php b/lib/Drupal/views/Plugin/views/style/UnformattedSummary.php index c96dc3f..968bcc6 100644 --- a/lib/Drupal/views/Plugin/views/style/UnformattedSummary.php +++ b/lib/Drupal/views/Plugin/views/style/UnformattedSummary.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Translation; * The default style plugin for summaries. * * @ingroup views_style_plugins - */ - -/** + * * @Plugin( * id = "unformatted_summary", * title = @Translation("Unformatted"), @@ -28,6 +26,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class UnformattedSummary extends DefaultSummary { + function option_definition() { $options = parent::option_definition(); $options['inline'] = array('default' => FALSE, 'bool' => TRUE); @@ -48,4 +47,5 @@ class UnformattedSummary extends DefaultSummary { '#default_value' => $this->options['separator'], ); } + } diff --git a/lib/Drupal/views/Plugin/views/wizard/Comment.php b/lib/Drupal/views/Plugin/views/wizard/Comment.php index 2861b19..48c0743 100644 --- a/lib/Drupal/views/Plugin/views/wizard/Comment.php +++ b/lib/Drupal/views/Plugin/views/wizard/Comment.php @@ -145,4 +145,5 @@ class Comment extends WizardPluginBase { return $display_options; } + } diff --git a/lib/Drupal/views/Plugin/views/wizard/File.php b/lib/Drupal/views/Plugin/views/wizard/File.php index c26a4a3..7ddc060 100644 --- a/lib/Drupal/views/Plugin/views/wizard/File.php +++ b/lib/Drupal/views/Plugin/views/wizard/File.php @@ -29,6 +29,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class File extends WizardPluginBase { + protected function default_display_options($form, $form_state) { $display_options = parent::default_display_options($form, $form_state); @@ -57,4 +58,5 @@ class File extends WizardPluginBase { return $display_options; } + } diff --git a/lib/Drupal/views/Plugin/views/wizard/Node.php b/lib/Drupal/views/Plugin/views/wizard/Node.php index 2a75a07..c9244b4 100644 --- a/lib/Drupal/views/Plugin/views/wizard/Node.php +++ b/lib/Drupal/views/Plugin/views/wizard/Node.php @@ -173,4 +173,5 @@ class Node extends WizardPluginBase { break; } } + } diff --git a/lib/Drupal/views/Plugin/views/wizard/NodeRevision.php b/lib/Drupal/views/Plugin/views/wizard/NodeRevision.php index 15939b2..9380cb4 100644 --- a/lib/Drupal/views/Plugin/views/wizard/NodeRevision.php +++ b/lib/Drupal/views/Plugin/views/wizard/NodeRevision.php @@ -108,4 +108,5 @@ class NodeRevision extends WizardPluginBase { return $display_options; } + } diff --git a/lib/Drupal/views/Plugin/views/wizard/TaxonomyTerm.php b/lib/Drupal/views/Plugin/views/wizard/TaxonomyTerm.php index 295c187..1665560 100644 --- a/lib/Drupal/views/Plugin/views/wizard/TaxonomyTerm.php +++ b/lib/Drupal/views/Plugin/views/wizard/TaxonomyTerm.php @@ -60,4 +60,5 @@ class TaxonomyTerm extends WizardPluginBase { return $display_options; } + } diff --git a/lib/Drupal/views/Plugin/views/wizard/Users.php b/lib/Drupal/views/Plugin/views/wizard/Users.php index e103290..0f00754 100644 --- a/lib/Drupal/views/Plugin/views/wizard/Users.php +++ b/lib/Drupal/views/Plugin/views/wizard/Users.php @@ -44,6 +44,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Users extends WizardPluginBase { + protected function default_display_options($form, $form_state) { $display_options = parent::default_display_options($form, $form_state); @@ -74,4 +75,5 @@ class Users extends WizardPluginBase { return $display_options; } + } diff --git a/lib/Drupal/views/Plugin/views/wizard/WizardException.php b/lib/Drupal/views/Plugin/views/wizard/WizardException.php index bf84611..39f4b83 100644 --- a/lib/Drupal/views/Plugin/views/wizard/WizardException.php +++ b/lib/Drupal/views/Plugin/views/wizard/WizardException.php @@ -12,4 +12,5 @@ use Exception; * A custom exception class for our errors. */ class WizardException extends Exception { + } diff --git a/lib/Drupal/views/Plugin/views/wizard/WizardInterface.php b/lib/Drupal/views/Plugin/views/wizard/WizardInterface.php index 0c8d57f..c904192 100644 --- a/lib/Drupal/views/Plugin/views/wizard/WizardInterface.php +++ b/lib/Drupal/views/Plugin/views/wizard/WizardInterface.php @@ -10,6 +10,7 @@ namespace Drupal\views\Plugin\views\wizard; * Defines a common interface for Views Wizard plugins. */ interface WizardInterface { + function __construct($plugin); /** @@ -32,4 +33,5 @@ interface WizardInterface { * @throws ViewsWizardException in the event of a problem. */ function create_view($form, &$form_state); + } diff --git a/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php b/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php index a90ad36..d084b7e 100644 --- a/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php +++ b/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php @@ -16,11 +16,17 @@ use Drupal\views\Plugin\Type\ViewsPluginManager; * Provides the interface and base class for Views Wizard plugins. */ abstract class WizardPluginBase implements WizardInterface { + protected $base_table; + protected $entity_type; + protected $entity_info = array(); + protected $validated_views = array(); + protected $plugin = array(); + protected $filter_defaults = array( 'id' => NULL, 'expose' => array('operator' => FALSE), diff --git a/lib/Drupal/views/View.php b/lib/Drupal/views/View.php index 58ce519..991b676 100644 --- a/lib/Drupal/views/View.php +++ b/lib/Drupal/views/View.php @@ -22,8 +22,11 @@ use Drupal\views\Plugin\Type\ViewsPluginManager; * functions to build the view query, execute the query and render the output. */ class View extends ViewsDbObject { + var $db_table = 'views_view'; + var $base_table = 'node'; + var $base_field = 'nid'; /** @@ -2239,4 +2242,5 @@ class View extends ViewsDbObject { return $retval; } + } diff --git a/lib/Drupal/views/ViewsDbObject.php b/lib/Drupal/views/ViewsDbObject.php index d175f24..a04601c 100644 --- a/lib/Drupal/views/ViewsDbObject.php +++ b/lib/Drupal/views/ViewsDbObject.php @@ -11,6 +11,7 @@ namespace Drupal\views; * Base class for views' database objects. */ class ViewsDbObject { + public $db_table; /** @@ -407,4 +408,5 @@ class ViewsDbObject { $item[$option] = $value; $this->set_item($display_id, $type, $id, $item); } + } diff --git a/lib/Drupal/views/ViewsDisplay.php b/lib/Drupal/views/ViewsDisplay.php index 5e465d4..af7f47a 100644 --- a/lib/Drupal/views/ViewsDisplay.php +++ b/lib/Drupal/views/ViewsDisplay.php @@ -14,6 +14,7 @@ namespace Drupal\views; * to the behavior of the display at all. */ class ViewsDisplay extends ViewsDbObject { + /** * The display handler itself, which has all the methods. * @@ -39,4 +40,5 @@ class ViewsDisplay extends ViewsDbObject { $this->id = $id; $this->display_title = $title; } + } diff --git a/lib/Views/aggregator/Plugin/views/argument/CategoryCid.php b/lib/Views/aggregator/Plugin/views/argument/CategoryCid.php index 2a2db78..04430a2 100644 --- a/lib/Views/aggregator/Plugin/views/argument/CategoryCid.php +++ b/lib/Views/aggregator/Plugin/views/argument/CategoryCid.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Argument handler to accept an aggregator category id. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "aggregator_category_cid", * module = "aggregator" * ) */ class CategoryCid extends Numeric { + /** * Override the behavior of title(). Get the title of the category. */ @@ -35,4 +34,5 @@ class CategoryCid extends Numeric { } return $titles; } + } diff --git a/lib/Views/aggregator/Plugin/views/argument/Fid.php b/lib/Views/aggregator/Plugin/views/argument/Fid.php index 7c754e0..9a41905 100644 --- a/lib/Views/aggregator/Plugin/views/argument/Fid.php +++ b/lib/Views/aggregator/Plugin/views/argument/Fid.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Argument handler to accept an aggregator feed id. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "aggregator_fid", * module = "aggregator" * ) */ class Fid extends Numeric { + /** * Override the behavior of title(). Get the title of the feed. */ @@ -35,4 +34,5 @@ class Fid extends Numeric { } return $titles; } + } diff --git a/lib/Views/aggregator/Plugin/views/argument/Iid.php b/lib/Views/aggregator/Plugin/views/argument/Iid.php index 0b380e8..b07d5fe 100644 --- a/lib/Views/aggregator/Plugin/views/argument/Iid.php +++ b/lib/Views/aggregator/Plugin/views/argument/Iid.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Argument handler to accept an aggregator item id. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "aggregator_iid", * module = "aggregator" * ) */ class Iid extends Numeric { + /** * Override the behavior of title(). Get the title of the category. */ @@ -39,4 +38,5 @@ class Iid extends Numeric { } return $titles; } + } diff --git a/lib/Views/aggregator/Plugin/views/field/Category.php b/lib/Views/aggregator/Plugin/views/field/Category.php index d786f99..bf26290 100644 --- a/lib/Views/aggregator/Plugin/views/field/Category.php +++ b/lib/Views/aggregator/Plugin/views/field/Category.php @@ -15,15 +15,14 @@ use Drupal\Core\Annotation\Plugin; * category. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "aggregator_category", * module = "aggregator" * ) */ class Category extends FieldPluginBase { + /** * Constructor to provide additional field to add. */ @@ -69,4 +68,5 @@ class Category extends FieldPluginBase { $value = $this->get_value($values); return $this->render_link($this->sanitize_value($value), $values); } + } diff --git a/lib/Views/aggregator/Plugin/views/field/TitleLink.php b/lib/Views/aggregator/Plugin/views/field/TitleLink.php index a370dff..15bf37d 100644 --- a/lib/Views/aggregator/Plugin/views/field/TitleLink.php +++ b/lib/Views/aggregator/Plugin/views/field/TitleLink.php @@ -15,15 +15,14 @@ use Drupal\Core\Annotation\Plugin; * source article. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "aggregator_title_link", * module = "aggregator" * ) */ class TitleLink extends FieldPluginBase { + function construct() { parent::construct(); $this->additional_fields['link'] = 'link'; @@ -64,4 +63,5 @@ class TitleLink extends FieldPluginBase { return $data; } + } diff --git a/lib/Views/aggregator/Plugin/views/field/Xss.php b/lib/Views/aggregator/Plugin/views/field/Xss.php index f6c39d6..d3a71cd 100644 --- a/lib/Views/aggregator/Plugin/views/field/Xss.php +++ b/lib/Views/aggregator/Plugin/views/field/Xss.php @@ -14,17 +14,17 @@ use Drupal\Core\Annotation\Plugin; * Filters htmls tags from item. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "aggregator_xss", * module = "aggregator" * ) */ class Xss extends FieldPluginBase { + function render($values) { $value = $this->get_value($values); return aggregator_filter_xss($value); } + } diff --git a/lib/Views/aggregator/Plugin/views/filter/CategoryCid.php b/lib/Views/aggregator/Plugin/views/filter/CategoryCid.php index 5ef1562..04c0bcc 100644 --- a/lib/Views/aggregator/Plugin/views/filter/CategoryCid.php +++ b/lib/Views/aggregator/Plugin/views/filter/CategoryCid.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Filter by aggregator category cid * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "aggregator_category_cid", * module = "aggregator" * ) */ class CategoryCid extends InOperator { + function get_value_options() { if (isset($this->value_options)) { return; @@ -35,4 +34,5 @@ class CategoryCid extends InOperator { $this->value_options[$category->cid] = $category->title; } } + } diff --git a/lib/Views/aggregator/Plugin/views/row/Rss.php b/lib/Views/aggregator/Plugin/views/row/Rss.php index 104498a..06e611f 100644 --- a/lib/Views/aggregator/Plugin/views/row/Rss.php +++ b/lib/Views/aggregator/Plugin/views/row/Rss.php @@ -26,6 +26,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Rss extends RowPluginBase { + var $base_table = 'aggregator_item'; var $base_field = 'iid'; @@ -88,4 +89,5 @@ class Rss extends RowPluginBase { 'row' => $item )); } + } diff --git a/lib/Views/book/Plugin/views/argument_default/Root.php b/lib/Views/book/Plugin/views/argument_default/Root.php index 25d9ad9..df28fd3 100644 --- a/lib/Views/book/Plugin/views/argument_default/Root.php +++ b/lib/Views/book/Plugin/views/argument_default/Root.php @@ -1,4 +1,5 @@ argument) { $title = variable_get('anonymous', t('Anonymous')); @@ -70,4 +69,5 @@ class UserUid extends ArgumentPluginBase { function get_sort_name() { return t('Numerical', array(), array('context' => 'Sort order')); } + } diff --git a/lib/Views/comment/Plugin/views/field/Comment.php b/lib/Views/comment/Plugin/views/field/Comment.php index f6410a3..fc2217b 100644 --- a/lib/Views/comment/Plugin/views/field/Comment.php +++ b/lib/Views/comment/Plugin/views/field/Comment.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to allow linking to a comment. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment", * module = "comment" * ) */ class Comment extends FieldPluginBase { + /** * Override init function to provide generic option to link to comment. */ @@ -82,4 +81,5 @@ class Comment extends FieldPluginBase { $value = $this->get_value($values); return $this->render_link($this->sanitize_value($value), $values); } + } diff --git a/lib/Views/comment/Plugin/views/field/Depth.php b/lib/Views/comment/Plugin/views/field/Depth.php index 4354b94..b3b2346 100644 --- a/lib/Views/comment/Plugin/views/field/Depth.php +++ b/lib/Views/comment/Plugin/views/field/Depth.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\field\FieldPluginBase; * Field handler to display the depth of a comment. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_depth", * module = "comment" * ) */ class Depth extends FieldPluginBase { + /** * Work out the depth of this comment */ @@ -30,4 +29,5 @@ class Depth extends FieldPluginBase { $comment_thread = $this->get_value($values); return count(explode('.', $comment_thread)) - 1; } + } diff --git a/lib/Views/comment/Plugin/views/field/LInkDelete.php b/lib/Views/comment/Plugin/views/field/LInkDelete.php index 0de3941..173bdf7 100644 --- a/lib/Views/comment/Plugin/views/field/LInkDelete.php +++ b/lib/Views/comment/Plugin/views/field/LInkDelete.php @@ -13,15 +13,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to delete a node. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_link_delete", * module = "comment" * ) */ class LinkDelete extends Link { + function access() { //needs permission to administer comments in general return user_access('administer comments'); @@ -37,4 +36,5 @@ class LinkDelete extends Link { return $text; } + } diff --git a/lib/Views/comment/Plugin/views/field/LastTimestamp.php b/lib/Views/comment/Plugin/views/field/LastTimestamp.php index 9051c3a..f87d04c 100644 --- a/lib/Views/comment/Plugin/views/field/LastTimestamp.php +++ b/lib/Views/comment/Plugin/views/field/LastTimestamp.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to display the timestamp of a comment with the count of comments. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_last_timestamp", * module = "comment" * ) */ class LastTimestamp extends Date { + function construct() { parent::construct(); $this->additional_fields['comment_count'] = 'comment_count'; @@ -37,4 +36,5 @@ class LastTimestamp extends Date { return NULL; } } + } diff --git a/lib/Views/comment/Plugin/views/field/Link.php b/lib/Views/comment/Plugin/views/field/Link.php index 748356a..e9540fe 100644 --- a/lib/Views/comment/Plugin/views/field/Link.php +++ b/lib/Views/comment/Plugin/views/field/Link.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Base field handler to present a link. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_link", * module = "comment" * ) */ class Link extends Entity { + function construct() { parent::construct(); } @@ -78,4 +77,5 @@ class Link extends Entity { return $text; } + } diff --git a/lib/Views/comment/Plugin/views/field/LinkApprove.php b/lib/Views/comment/Plugin/views/field/LinkApprove.php index ae51b38..a0085c1 100644 --- a/lib/Views/comment/Plugin/views/field/LinkApprove.php +++ b/lib/Views/comment/Plugin/views/field/LinkApprove.php @@ -13,15 +13,14 @@ use Drupal\Core\Annotation\Plugin; * Provides a comment approve link. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_link_approve", * module = "comment" * ) */ class LinkApprove extends Link { + function access() { //needs permission to administer comments in general return user_access('administer comments'); @@ -44,4 +43,5 @@ class LinkApprove extends Link { return $text; } + } diff --git a/lib/Views/comment/Plugin/views/field/LinkEdit.php b/lib/Views/comment/Plugin/views/field/LinkEdit.php index c9e2ecf..3780d50 100644 --- a/lib/Views/comment/Plugin/views/field/LinkEdit.php +++ b/lib/Views/comment/Plugin/views/field/LinkEdit.php @@ -13,15 +13,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link node edit. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_link_edit", * module = "comment" * ) */ class LinkEdit extends Link { + function option_definition() { $options = parent::option_definition(); $options['destination'] = array('default' => FALSE, 'bool' => TRUE); @@ -60,4 +59,5 @@ class LinkEdit extends Link { return $text; } + } diff --git a/lib/Views/comment/Plugin/views/field/LinkReply.php b/lib/Views/comment/Plugin/views/field/LinkReply.php index bd39ee0..b00de61 100644 --- a/lib/Views/comment/Plugin/views/field/LinkReply.php +++ b/lib/Views/comment/Plugin/views/field/LinkReply.php @@ -13,15 +13,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to delete a node. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_link_reply", * module = "comment" * ) */ class LinkReply extends Link { + function access() { //check for permission to reply to comments return user_access('post comments'); @@ -37,4 +36,5 @@ class LinkReply extends Link { return $text; } + } diff --git a/lib/Views/comment/Plugin/views/field/NcsLastCommentName.php b/lib/Views/comment/Plugin/views/field/NcsLastCommentName.php index 7514333..679f665 100644 --- a/lib/Views/comment/Plugin/views/field/NcsLastCommentName.php +++ b/lib/Views/comment/Plugin/views/field/NcsLastCommentName.php @@ -15,15 +15,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present the name of the last comment poster. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_ncs_last_comment_name", * module = "comment" * ) */ class NcsLastCommentName extends FieldPluginBase { + function query() { // last_comment_name only contains data if the user is anonymous. So we // have to join in a specially related user table. @@ -64,4 +63,5 @@ class NcsLastCommentName extends FieldPluginBase { return $this->sanitize_value($this->get_value($values)); } } + } diff --git a/lib/Views/comment/Plugin/views/field/NcsLastUpdated.php b/lib/Views/comment/Plugin/views/field/NcsLastUpdated.php index e8d43d8..4ad1c7b 100644 --- a/lib/Views/comment/Plugin/views/field/NcsLastUpdated.php +++ b/lib/Views/comment/Plugin/views/field/NcsLastUpdated.php @@ -14,18 +14,18 @@ use Drupal\Core\Annotation\Plugin; * Field handler to display the newer of last comment / node updated. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_ncs_last_updated", * module = "comment" * ) */ class NcsLastUpdated extends Date { + function query() { $this->ensure_my_table(); $this->node_table = $this->query->ensure_table('node', $this->relationship); $this->field_alias = $this->query->add_field(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)", $this->table_alias . '_' . $this->field); } + } diff --git a/lib/Views/comment/Plugin/views/field/NodeComment.php b/lib/Views/comment/Plugin/views/field/NodeComment.php index 92591a4..4649936 100644 --- a/lib/Views/comment/Plugin/views/field/NodeComment.php +++ b/lib/Views/comment/Plugin/views/field/NodeComment.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Display node comment status. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_comment", * module = "comment" * ) */ class NodeComment extends FieldPluginBase { + function render($values) { $value = $this->get_value($values); switch ($value) { @@ -35,4 +34,5 @@ class NodeComment extends FieldPluginBase { return t('Open'); } } + } diff --git a/lib/Views/comment/Plugin/views/field/NodeLink.php b/lib/Views/comment/Plugin/views/field/NodeLink.php index 09b9e04..9d5861b 100644 --- a/lib/Views/comment/Plugin/views/field/NodeLink.php +++ b/lib/Views/comment/Plugin/views/field/NodeLink.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Handler for showing comment module's node link. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_node_link", * module = "comment" * ) */ class NodeLink extends Entity { + function construct() { parent::construct(); @@ -73,4 +72,5 @@ class NodeLink extends Entity { // Only render the links, if they are defined. return !empty($node->content['links']['comment']) ? drupal_render($node->content['links']['comment']) : ''; } + } diff --git a/lib/Views/comment/Plugin/views/field/NodeNewComments.php b/lib/Views/comment/Plugin/views/field/NodeNewComments.php index 368d4a1..61effae 100644 --- a/lib/Views/comment/Plugin/views/field/NodeNewComments.php +++ b/lib/Views/comment/Plugin/views/field/NodeNewComments.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to display the number of new comments. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_new_comments", * module = "comment" * ) */ class NodeNewComments extends Numeric { + function init(&$view, &$options) { parent::init($view, $options); @@ -125,4 +124,5 @@ class NodeNewComments extends Numeric { $this->options['alter']['make_link'] = FALSE; } } + } diff --git a/lib/Views/comment/Plugin/views/field/Username.php b/lib/Views/comment/Plugin/views/field/Username.php index 427fe57..aa4bb72 100644 --- a/lib/Views/comment/Plugin/views/field/Username.php +++ b/lib/Views/comment/Plugin/views/field/Username.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to allow linking to a user account or homepage. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "comment_username", * module = "comment" * ) */ class Username extends FieldPluginBase { + /** * Override init function to add uid and homepage fields. */ @@ -67,4 +66,5 @@ class Username extends FieldPluginBase { $value = $this->get_value($values); return $this->render_link($this->sanitize_value($value), $values); } + } diff --git a/lib/Views/comment/Plugin/views/filter/NcsLastUpdated.php b/lib/Views/comment/Plugin/views/filter/NcsLastUpdated.php index 65c123b..9f8505e 100644 --- a/lib/Views/comment/Plugin/views/filter/NcsLastUpdated.php +++ b/lib/Views/comment/Plugin/views/filter/NcsLastUpdated.php @@ -15,15 +15,14 @@ use Drupal\Core\Annotation\Plugin; * Filter handler for the newer of last comment / node updated. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "ncs_last_updated", * module = "comment" * ) */ class NcsLastUpdated extends Date { + function query() { $this->ensure_my_table(); $this->node_table = $this->query->ensure_table('node', $this->relationship); @@ -35,4 +34,5 @@ class NcsLastUpdated extends Date { $this->{$info[$this->operator]['method']}($field); } } + } diff --git a/lib/Views/comment/Plugin/views/filter/NodeComment.php b/lib/Views/comment/Plugin/views/filter/NodeComment.php index 1d5f59a..2e3b3b2 100644 --- a/lib/Views/comment/Plugin/views/filter/NodeComment.php +++ b/lib/Views/comment/Plugin/views/filter/NodeComment.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Filter based on comment node status. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_comment", * module = "comment" * ) */ class NodeComment extends InOperator { + function get_value_options() { $this->value_options = array( COMMENT_NODE_HIDDEN => t('Hidden'), @@ -30,4 +29,5 @@ class NodeComment extends InOperator { COMMENT_NODE_OPEN => t('Open'), ); } + } diff --git a/lib/Views/comment/Plugin/views/filter/UserUid.php b/lib/Views/comment/Plugin/views/filter/UserUid.php index 4cee522..bd057e7 100644 --- a/lib/Views/comment/Plugin/views/filter/UserUid.php +++ b/lib/Views/comment/Plugin/views/filter/UserUid.php @@ -15,15 +15,14 @@ use Drupal\Core\Annotation\Plugin; * commented on. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "comment_user_uid", * module = "comment" * ) */ class UserUid extends FilterPluginBase { + function query() { $this->ensure_my_table(); @@ -38,4 +37,5 @@ class UserUid extends FilterPluginBase { $this->query->add_where($this->options['group'], $condition); } + } diff --git a/lib/Views/comment/Plugin/views/row/Rss.php b/lib/Views/comment/Plugin/views/row/Rss.php index 71cdf74..470b26b 100644 --- a/lib/Views/comment/Plugin/views/row/Rss.php +++ b/lib/Views/comment/Plugin/views/row/Rss.php @@ -27,6 +27,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class Rss extends RowPluginBase { + var $base_table = 'comment'; var $base_field = 'cid'; @@ -167,4 +168,5 @@ class Rss extends RowPluginBase { 'row' => $item )); } + } diff --git a/lib/Views/comment/Plugin/views/row/View.php b/lib/Views/comment/Plugin/views/row/View.php index d034ce8..23383a5 100644 --- a/lib/Views/comment/Plugin/views/row/View.php +++ b/lib/Views/comment/Plugin/views/row/View.php @@ -27,6 +27,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class View extends RowPluginBase { + var $base_field = 'cid'; var $base_table = 'comment'; @@ -112,4 +113,5 @@ class View extends RowPluginBase { $this->nodes[$node->nid] = $node; } } + } diff --git a/lib/Views/comment/Plugin/views/sort/NcsLastCommentName.php b/lib/Views/comment/Plugin/views/sort/NcsLastCommentName.php index 42341b0..44f39ab 100644 --- a/lib/Views/comment/Plugin/views/sort/NcsLastCommentName.php +++ b/lib/Views/comment/Plugin/views/sort/NcsLastCommentName.php @@ -16,15 +16,14 @@ use Drupal\Core\Annotation\Plugin; * fields. * * @ingroup views_sort_handlers - */ - -/** + * * @Plugin( * id = "ncs_last_comment_name", * module = "comment" * ) */ class NcsLastCommentName extends SortPluginBase { + function query() { $this->ensure_my_table(); $join = new Join(); @@ -40,4 +39,5 @@ class NcsLastCommentName extends SortPluginBase { // Add the field. $this->query->add_orderby(NULL, "LOWER(COALESCE($this->user_table.name, $this->table_alias.$this->field))", $this->options['order'], $this->table_alias . '_' . $this->field); } + } diff --git a/lib/Views/comment/Plugin/views/sort/NcsLastUpdated.php b/lib/Views/comment/Plugin/views/sort/NcsLastUpdated.php index ff984e6..90ac01b 100644 --- a/lib/Views/comment/Plugin/views/sort/NcsLastUpdated.php +++ b/lib/Views/comment/Plugin/views/sort/NcsLastUpdated.php @@ -14,18 +14,18 @@ use Drupal\Core\Annotation\Plugin; * Sort handler for the newer of last comment / node updated. * * @ingroup views_sort_handlers - */ - -/** + * * @Plugin( * id = "ncs_last_updated", * module = "comment" * ) */ class NcsLastUpdated extends Date { + function query() { $this->ensure_my_table(); $this->node_table = $this->query->ensure_table('node', $this->relationship); $this->field_alias = $this->query->add_orderby(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->table_alias . ".last_comment_timestamp)", $this->options['order'], $this->table_alias . '_' . $this->field); } + } diff --git a/lib/Views/comment/Plugin/views/sort/Thread.php b/lib/Views/comment/Plugin/views/sort/Thread.php index 64fe437..b09e9ba 100644 --- a/lib/Views/comment/Plugin/views/sort/Thread.php +++ b/lib/Views/comment/Plugin/views/sort/Thread.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Sort handler for ordering by thread. * * @ingroup views_sort_handlers - */ - -/** + * * @Plugin( * id = "comment_thread", * module = "comment" * ) */ class Thread extends SortPluginBase { + function query() { $this->ensure_my_table(); @@ -37,4 +36,5 @@ class Thread extends SortPluginBase { $this->query->add_orderby(NULL, "SUBSTRING({$this->table_alias}.{$this->real_field}, 1, (LENGTH({$this->table_alias}.{$this->real_field}) - 1))", $this->options['order'], $alias); } } + } diff --git a/lib/Views/contact/Plugin/views/field/ContactLink.php b/lib/Views/contact/Plugin/views/field/ContactLink.php index 15b38fa..56ebd71 100644 --- a/lib/Views/contact/Plugin/views/field/ContactLink.php +++ b/lib/Views/contact/Plugin/views/field/ContactLink.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * A field that links to the user contact page, if access is permitted. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "contact_link", * module = "contact" @@ -66,4 +64,5 @@ class ContactLink extends Link { return $text; } + } diff --git a/lib/Views/field/Plugin/views/argument/FieldList.php b/lib/Views/field/Plugin/views/argument/FieldList.php index 4c8d843..52123fb 100644 --- a/lib/Views/field/Plugin/views/argument/FieldList.php +++ b/lib/Views/field/Plugin/views/argument/FieldList.php @@ -15,15 +15,14 @@ use Drupal\Core\Annotation\Plugin; * summary. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "field_list", * module = "field" * ) */ class FieldList extends Numeric { + /** * Stores the allowed values of this field. * @@ -71,4 +70,5 @@ class FieldList extends Numeric { return check_plain($value); } } + } diff --git a/lib/Views/field/Plugin/views/argument/ListString.php b/lib/Views/field/Plugin/views/argument/ListString.php index ab1130e..852503d 100644 --- a/lib/Views/field/Plugin/views/argument/ListString.php +++ b/lib/Views/field/Plugin/views/argument/ListString.php @@ -16,15 +16,14 @@ use Drupal\Core\Annotation\Plugin; * summary. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "field_list_string", * module = "field" * ) */ class ListString extends String { + /** * Stores the allowed values of this field. * @@ -73,4 +72,5 @@ class ListString extends String { return $this->case_transform(check_plain($value), $this->options['case']); } } + } diff --git a/lib/Views/field/Plugin/views/field/Field.php b/lib/Views/field/Plugin/views/field/Field.php index 134cc3f..fd3dd8d 100644 --- a/lib/Views/field/Plugin/views/field/Field.php +++ b/lib/Views/field/Plugin/views/field/Field.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * A field that displays fieldapi fields. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "field", * module = "field" * ) */ class Field extends FieldPluginBase { + /** * An array to store field renderable arrays for use by render_items. * @var array @@ -919,4 +918,5 @@ class Field extends FieldPluginBase { return LANGUAGE_NOT_SPECIFIED; } } + } diff --git a/lib/Views/field/Plugin/views/filter/FieldList.php b/lib/Views/field/Plugin/views/filter/FieldList.php index 6337c3b..66e17a7 100644 --- a/lib/Views/field/Plugin/views/filter/FieldList.php +++ b/lib/Views/field/Plugin/views/filter/FieldList.php @@ -14,17 +14,17 @@ use Drupal\Core\Annotation\Plugin; * Filter handler which uses list-fields as options. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "field_list", * module = "field" * ) */ class FieldList extends InOperator { + function get_value_options() { $field = field_info_field($this->definition['field_name']); $this->value_options = list_allowed_values($field); } + } diff --git a/lib/Views/field/Plugin/views/relationship/EntityReverse.php b/lib/Views/field/Plugin/views/relationship/EntityReverse.php index bd70d9f..38ed9d4 100644 --- a/lib/Views/field/Plugin/views/relationship/EntityReverse.php +++ b/lib/Views/field/Plugin/views/relationship/EntityReverse.php @@ -15,15 +15,14 @@ use Drupal\Core\Annotation\Plugin; * A relationship handlers which reverse entity references. * * @ingroup views_relationship_handlers - */ - -/** + * * @Plugin( * id = "entity_reverse", * module = "field" * ) */ class EntityReverse extends RelationshipPluginBase { + function init(&$view, &$options) { parent::init($view, $options); @@ -94,4 +93,5 @@ class EntityReverse extends RelationshipPluginBase { $this->alias = $this->query->add_relationship($alias, $second_join, $this->definition['base'], $this->relationship); } + } diff --git a/lib/Views/file/Plugin/views/argument/Fid.php b/lib/Views/file/Plugin/views/argument/Fid.php index c4dbb4f..a1f24f9 100644 --- a/lib/Views/file/Plugin/views/argument/Fid.php +++ b/lib/Views/file/Plugin/views/argument/Fid.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\argument\Numeric; * Argument handler to accept multiple file ids. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "file_fid", * module = "file" * ) */ class Fid extends Numeric { + /** * Override the behavior of title_query(). Get the filenames. */ @@ -37,4 +36,5 @@ class Fid extends Numeric { } return $titles; } + } diff --git a/lib/Views/file/Plugin/views/field/Extension.php b/lib/Views/file/Plugin/views/field/Extension.php index 9310d36..9475cf9 100644 --- a/lib/Views/file/Plugin/views/field/Extension.php +++ b/lib/Views/file/Plugin/views/field/Extension.php @@ -14,19 +14,19 @@ use Drupal\views\Plugin\views\field\FieldPluginBase; * Returns a pure file extension of the file, for example 'module'. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "file_extension", * module = "file" * ) */ class Extension extends FieldPluginBase { + function render($values) { $value = $this->get_value($values); if (preg_match('/\.([^\.]+)$/', $value, $match)) { return $this->sanitize_value($match[1]); } } + } diff --git a/lib/Views/file/Plugin/views/field/File.php b/lib/Views/file/Plugin/views/field/File.php index 6ffc6be..c26329c 100644 --- a/lib/Views/file/Plugin/views/field/File.php +++ b/lib/Views/file/Plugin/views/field/File.php @@ -15,15 +15,14 @@ use Drupal\views\Plugin\views\field\FieldPluginBase; * Field handler to provide simple renderer that allows linking to a file. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "file", * module = "file" * ) */ class File extends FieldPluginBase { + /** * Constructor to provide additional field to add. */ @@ -71,4 +70,5 @@ class File extends FieldPluginBase { $value = $this->get_value($values); return $this->render_link($this->sanitize_value($value), $values); } + } diff --git a/lib/Views/file/Plugin/views/field/FileMime.php b/lib/Views/file/Plugin/views/field/FileMime.php index 3f74397..ef60ae7 100644 --- a/lib/Views/file/Plugin/views/field/FileMime.php +++ b/lib/Views/file/Plugin/views/field/FileMime.php @@ -13,15 +13,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to add rendering MIME type images as an option on the filemime field. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "file_filemime", * module = "file" * ) */ class FileMime extends File { + function option_definition() { $options = parent::option_definition(); $options['filemime_image'] = array('default' => FALSE, 'bool' => TRUE); @@ -46,4 +45,5 @@ class FileMime extends File { return $this->render_link($data, $values); } + } diff --git a/lib/Views/file/Plugin/views/field/Status.php b/lib/Views/file/Plugin/views/field/Status.php index 5cb2ba2..8b8b6c5 100644 --- a/lib/Views/file/Plugin/views/field/Status.php +++ b/lib/Views/file/Plugin/views/field/Status.php @@ -14,17 +14,17 @@ use Drupal\views\Plugin\views\field\FieldPluginBase; * Field handler to translate a node type into its readable form. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "file_status", * module = "file" * ) */ class Status extends FieldPluginBase { + function render($values) { $value = $this->get_value($values); return _views_file_status($value); } + } diff --git a/lib/Views/file/Plugin/views/field/Uri.php b/lib/Views/file/Plugin/views/field/Uri.php index d3f1583..9ff821d 100644 --- a/lib/Views/file/Plugin/views/field/Uri.php +++ b/lib/Views/file/Plugin/views/field/Uri.php @@ -18,6 +18,7 @@ use Drupal\Core\Annotation\Plugin; * ) */ class Uri extends File { + function option_definition() { $options = parent::option_definition(); $options['file_download_path'] = array('default' => FALSE, 'bool' => TRUE); @@ -41,4 +42,5 @@ class Uri extends File { } return $this->render_link($data, $values); } + } diff --git a/lib/Views/file/Plugin/views/filter/Status.php b/lib/Views/file/Plugin/views/filter/Status.php index bb40507..8d94c71 100644 --- a/lib/Views/file/Plugin/views/filter/Status.php +++ b/lib/Views/file/Plugin/views/filter/Status.php @@ -14,18 +14,18 @@ use Drupal\views\Plugin\views\filter\InOperator; * Filter by file status. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "file_status", * module = "file" * ) */ class Status extends InOperator { + function get_value_options() { if (!isset($this->value_options)) { $this->value_options = _views_file_status(); } } + } diff --git a/lib/Views/filter/Plugin/views/field/FormatName.php b/lib/Views/filter/Plugin/views/field/FormatName.php index 636f223..2984cf9 100644 --- a/lib/Views/filter/Plugin/views/field/FormatName.php +++ b/lib/Views/filter/Plugin/views/field/FormatName.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to output the name of an input format. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "filter_format_name", * module = "filter" * ) */ class FormatName extends FieldPluginBase { + function construct() { parent::construct(); // Be explicit about the table we are using. @@ -45,4 +44,5 @@ class FormatName extends FieldPluginBase { } return $this->sanitize_value($format_name); } + } diff --git a/lib/Views/locale/Plugin/views/argument/Group.php b/lib/Views/locale/Plugin/views/argument/Group.php index be727c6..ef1b048 100644 --- a/lib/Views/locale/Plugin/views/argument/Group.php +++ b/lib/Views/locale/Plugin/views/argument/Group.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Argument handler to accept a language. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "locale_group", * module = "locale" * ) */ class Group extends ArgumentPluginBase { + function construct() { parent::construct('group'); } @@ -49,4 +48,5 @@ class Group extends ArgumentPluginBase { asort($groups); return isset($groups[$group]) ? $groups[$group] : t('Unknown group'); } + } diff --git a/lib/Views/locale/Plugin/views/argument/Language.php b/lib/Views/locale/Plugin/views/argument/Language.php index c05ff0b..3e77a74 100644 --- a/lib/Views/locale/Plugin/views/argument/Language.php +++ b/lib/Views/locale/Plugin/views/argument/Language.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Argument handler to accept a language. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "locale_language", * module = "locale" * ) */ class Language extends ArgumentPluginBase { + function construct() { parent::construct('language'); } @@ -47,4 +46,5 @@ class Language extends ArgumentPluginBase { $languages = views_language_list(); return isset($languages[$langcode]) ? $languages[$langcode] : t('Unknown language'); } + } diff --git a/lib/Views/locale/Plugin/views/field/Group.php b/lib/Views/locale/Plugin/views/field/Group.php index bae0595..5d5a753 100644 --- a/lib/Views/locale/Plugin/views/field/Group.php +++ b/lib/Views/locale/Plugin/views/field/Group.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to translate a group into its readable form. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "locale_group", * module = "locale" * ) */ class Group extends FieldPluginBase { + function render($values) { $groups = module_invoke_all('locale', 'groups'); // Sort the list. @@ -30,4 +29,5 @@ class Group extends FieldPluginBase { $value = $this->get_value($values); return isset($groups[$value]) ? $groups[$value] : ''; } + } diff --git a/lib/Views/locale/Plugin/views/field/Language.php b/lib/Views/locale/Plugin/views/field/Language.php index 41b90b7..04c9b0a 100644 --- a/lib/Views/locale/Plugin/views/field/Language.php +++ b/lib/Views/locale/Plugin/views/field/Language.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to translate a language into its readable form. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "locale_language", * module = "locale" * ) */ class Language extends FieldPluginBase { + function option_definition() { $options = parent::option_definition(); $options['native_language'] = array('default' => FALSE, 'bool' => TRUE); @@ -45,4 +44,5 @@ class Language extends FieldPluginBase { $value = $this->get_value($values); return isset($languages[$value]) ? $languages[$value] : ''; } + } diff --git a/lib/Views/locale/Plugin/views/field/LinkEdit.php b/lib/Views/locale/Plugin/views/field/LinkEdit.php index 811b030..85c236c 100644 --- a/lib/Views/locale/Plugin/views/field/LinkEdit.php +++ b/lib/Views/locale/Plugin/views/field/LinkEdit.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to edit a translation. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "locale_link_edit", * module = "locale" * ) */ class LinkEdit extends FieldPluginBase { + function construct() { parent::construct(); $this->additional_fields['lid'] = 'lid'; @@ -69,4 +68,5 @@ class LinkEdit extends FieldPluginBase { return $text; } + } diff --git a/lib/Views/locale/Plugin/views/field/NodeLanguage.php b/lib/Views/locale/Plugin/views/field/NodeLanguage.php index bd1093d..642c70d 100644 --- a/lib/Views/locale/Plugin/views/field/NodeLanguage.php +++ b/lib/Views/locale/Plugin/views/field/NodeLanguage.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to translate a language into its readable form. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_language", * module = "locale" * ) */ class NodeLanguage extends Node { + function option_definition() { $options = parent::option_definition(); $options['native_language'] = array('default' => FALSE, 'bool' => TRUE); @@ -46,4 +45,5 @@ class NodeLanguage extends Node { $value = isset($languages[$value]) ? $languages[$value] : ''; return $this->render_link($value, $values); } + } diff --git a/lib/Views/locale/Plugin/views/filter/Group.php b/lib/Views/locale/Plugin/views/filter/Group.php index 16b874c..69e2382 100644 --- a/lib/Views/locale/Plugin/views/filter/Group.php +++ b/lib/Views/locale/Plugin/views/filter/Group.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\InOperator; * Filter by locale group. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "locale_group", * module = "locale" * ) */ class Group extends InOperator { + function get_value_options() { if (!isset($this->value_options)) { $this->value_title = t('Group'); @@ -32,4 +31,5 @@ class Group extends InOperator { $this->value_options = $groups; } } + } diff --git a/lib/Views/locale/Plugin/views/filter/Language.php b/lib/Views/locale/Plugin/views/filter/Language.php index 27607a1..8829291 100644 --- a/lib/Views/locale/Plugin/views/filter/Language.php +++ b/lib/Views/locale/Plugin/views/filter/Language.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\InOperator; * Filter by language. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "locale_language", * module = "locale" * ) */ class Language extends InOperator { + function get_value_options() { if (!isset($this->value_options)) { $this->value_title = t('Language'); @@ -35,4 +34,5 @@ class Language extends InOperator { $this->value_options = $languages; } } + } diff --git a/lib/Views/locale/Plugin/views/filter/NodeLanguage.php b/lib/Views/locale/Plugin/views/filter/NodeLanguage.php index 1567446..a61a10a 100644 --- a/lib/Views/locale/Plugin/views/filter/NodeLanguage.php +++ b/lib/Views/locale/Plugin/views/filter/NodeLanguage.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\InOperator; * Filter by language. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_language", * module = "locale" * ) */ class NodeLanguage extends InOperator { + function get_value_options() { if (!isset($this->value_options)) { $this->value_title = t('Language'); @@ -35,4 +34,5 @@ class NodeLanguage extends InOperator { $this->value_options = $languages; } } + } diff --git a/lib/Views/locale/Plugin/views/filter/Version.php b/lib/Views/locale/Plugin/views/filter/Version.php index 9b0ec9c..839336a 100644 --- a/lib/Views/locale/Plugin/views/filter/Version.php +++ b/lib/Views/locale/Plugin/views/filter/Version.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\InOperator; * Filter by version. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "locale_version", * module = "locale" * ) */ class Version extends InOperator { + function get_value_options() { if (!isset($this->value_options)) { $this->value_title = t('Version'); @@ -37,4 +36,5 @@ class Version extends InOperator { $this->value_options = $versions; } } + } diff --git a/lib/Views/node/Plugin/views/argument/CreatedDay.php b/lib/Views/node/Plugin/views/argument/CreatedDay.php index 4c22a97..19aef2a 100644 --- a/lib/Views/node/Plugin/views/argument/CreatedDay.php +++ b/lib/Views/node/Plugin/views/argument/CreatedDay.php @@ -7,15 +7,14 @@ use Drupal\views\Plugin\views\argument\Date; /** * Argument handler for a day (DD) - */ - -/** + * * @Plugin( * id = "node_created_day", * module = "node" * ) */ class CreatedDay extends Date { + /** * Constructor implementation */ @@ -47,4 +46,5 @@ class CreatedDay extends Date { // Make sure the argument contains leading zeroes. return str_pad($data->{$this->base_alias}, 2, '0', STR_PAD_LEFT); } + } diff --git a/lib/Views/node/Plugin/views/argument/CreatedFullDate.php b/lib/Views/node/Plugin/views/argument/CreatedFullDate.php index 0e46d6c..b27b103 100644 --- a/lib/Views/node/Plugin/views/argument/CreatedFullDate.php +++ b/lib/Views/node/Plugin/views/argument/CreatedFullDate.php @@ -7,15 +7,14 @@ use Drupal\views\Plugin\views\argument\Date; /** * Argument handler for a full date (CCYYMMDD) - */ - -/** + * * @Plugin( * id = "node_created_fulldate", * module = "node" * ) */ class CreatedFullDate extends Date { + /** * Constructor implementation */ @@ -40,4 +39,5 @@ class CreatedFullDate extends Date { function title() { return format_date(strtotime($this->argument . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); } + } diff --git a/lib/Views/node/Plugin/views/argument/CreatedMonth.php b/lib/Views/node/Plugin/views/argument/CreatedMonth.php index 96fb821..d10f1a9 100644 --- a/lib/Views/node/Plugin/views/argument/CreatedMonth.php +++ b/lib/Views/node/Plugin/views/argument/CreatedMonth.php @@ -7,15 +7,14 @@ use Drupal\views\Plugin\views\argument\Date; /** * Argument handler for a month (MM) - */ - -/** + * * @Plugin( * id = "node_created_month", * module = "node" * ) */ class CreatedMonth extends Date { + /** * Constructor implementation */ @@ -46,4 +45,5 @@ class CreatedMonth extends Date { // Make sure the argument contains leading zeroes. return str_pad($data->{$this->base_alias}, 2, '0', STR_PAD_LEFT); } + } diff --git a/lib/Views/node/Plugin/views/argument/CreatedWeek.php b/lib/Views/node/Plugin/views/argument/CreatedWeek.php index b6fd91d..90b8830 100644 --- a/lib/Views/node/Plugin/views/argument/CreatedWeek.php +++ b/lib/Views/node/Plugin/views/argument/CreatedWeek.php @@ -7,15 +7,14 @@ use Drupal\views\Plugin\views\argument\Date; /** * Argument handler for a week. - */ - -/** + * * @Plugin( * id = "node_created_week", * module = "node" * ) */ class CreatedWeek extends Date { + /** * Constructor implementation */ @@ -32,4 +31,5 @@ class CreatedWeek extends Date { $created = $data->{$this->name_alias}; return t('Week @week', array('@week' => $created)); } + } diff --git a/lib/Views/node/Plugin/views/argument/CreatedYear.php b/lib/Views/node/Plugin/views/argument/CreatedYear.php index f09e148..3e81f1d 100644 --- a/lib/Views/node/Plugin/views/argument/CreatedYear.php +++ b/lib/Views/node/Plugin/views/argument/CreatedYear.php @@ -7,15 +7,14 @@ use Drupal\views\Plugin\views\argument\Date; /** * Argument handler for a year (CCYY) - */ - -/** + * * @Plugin( * id = "node_created_year", * module = "node" * ) */ class CreatedYear extends Date { + /** * Constructor implementation */ @@ -24,4 +23,5 @@ class CreatedYear extends Date { $this->arg_format = 'Y'; $this->formula = views_date_sql_extract('YEAR', "***table***.$this->real_field"); } + } diff --git a/lib/Views/node/Plugin/views/argument/CreatedYearMonth.php b/lib/Views/node/Plugin/views/argument/CreatedYearMonth.php index 903f238..87a9a42 100644 --- a/lib/Views/node/Plugin/views/argument/CreatedYearMonth.php +++ b/lib/Views/node/Plugin/views/argument/CreatedYearMonth.php @@ -7,15 +7,14 @@ use Drupal\views\Plugin\views\argument\Date; /** * Argument handler for a year plus month (CCYYMM) - */ - -/** + * * @Plugin( * id = "node_created_year_month", * module = "node" * ) */ class CreatedYearMonth extends Date { + /** * Constructor implementation */ @@ -40,4 +39,5 @@ class CreatedYearMonth extends Date { function title() { return format_date(strtotime($this->argument . "15" . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); } + } diff --git a/lib/Views/node/Plugin/views/argument/Language.php b/lib/Views/node/Plugin/views/argument/Language.php index ea258e0..a6f093b 100644 --- a/lib/Views/node/Plugin/views/argument/Language.php +++ b/lib/Views/node/Plugin/views/argument/Language.php @@ -12,15 +12,14 @@ use Drupal\Core\Annotation\Plugin; /** * Argument handler to accept a language. - */ - -/** + * * @Plugin( * id = "node_language", * module = "node" * ) */ class Language extends ArgumentPluginBase { + function construct() { parent::construct('language'); } @@ -45,4 +44,5 @@ class Language extends ArgumentPluginBase { $languages = views_language_list(); return isset($languages[$langcode]) ? $languages[$langcode] : t('Unknown language'); } + } diff --git a/lib/Views/node/Plugin/views/argument/Nid.php b/lib/Views/node/Plugin/views/argument/Nid.php index e8aa520..4fd05e1 100644 --- a/lib/Views/node/Plugin/views/argument/Nid.php +++ b/lib/Views/node/Plugin/views/argument/Nid.php @@ -12,15 +12,14 @@ use Drupal\Core\Annotation\Plugin; /** * Argument handler to accept a node id. - */ - -/** + * * @Plugin( * id = "node_nid", * module = "node" * ) */ class Nid extends Numeric { + /** * Override the behavior of title(). Get the title of the node. */ @@ -33,4 +32,5 @@ class Nid extends Numeric { } return $titles; } + } diff --git a/lib/Views/node/Plugin/views/argument/Type.php b/lib/Views/node/Plugin/views/argument/Type.php index f075dac..991b0d1 100644 --- a/lib/Views/node/Plugin/views/argument/Type.php +++ b/lib/Views/node/Plugin/views/argument/Type.php @@ -12,15 +12,14 @@ use Drupal\Core\Annotation\Plugin; /** * Argument handler to accept a node type. - */ - -/** + * * @Plugin( * id = "node_type", * module = "node" * ) */ class Type extends String { + function construct() { parent::construct('type'); } @@ -48,4 +47,5 @@ class Type extends String { } return check_plain($output); } + } diff --git a/lib/Views/node/Plugin/views/argument/UidRevision.php b/lib/Views/node/Plugin/views/argument/UidRevision.php index 7faf164..dae494e 100644 --- a/lib/Views/node/Plugin/views/argument/UidRevision.php +++ b/lib/Views/node/Plugin/views/argument/UidRevision.php @@ -13,18 +13,18 @@ use Drupal\Core\Annotation\Plugin; /** * Filter handler to accept a user id to check for nodes that * user posted or created a revision on. - */ - -/** + * * @Plugin( * id = "node_uid_revision", * module = "node" * ) */ class UidRevision extends Uid { + function query($group_by = FALSE) { $this->ensure_my_table(); $placeholder = $this->placeholder(); $this->query->add_where_expression(0, "$this->table_alias.uid = $placeholder OR ((SELECT COUNT(*) FROM {node_revision} nr WHERE nr.uid = $placeholder AND nr.nid = $this->table_alias.nid) > 0)", array($placeholder => $this->argument)); } + } diff --git a/lib/Views/node/Plugin/views/argument/Vid.php b/lib/Views/node/Plugin/views/argument/Vid.php index b0c2867..b2e71c5 100644 --- a/lib/Views/node/Plugin/views/argument/Vid.php +++ b/lib/Views/node/Plugin/views/argument/Vid.php @@ -12,15 +12,14 @@ use Drupal\Core\Annotation\Plugin; /** * Argument handler to accept a node revision id. - */ - -/** + * * @Plugin( * id = "node_vid", * module = "node" * ) */ class Vid extends Numeric { + // No constructor is necessary. /** @@ -45,4 +44,5 @@ class Vid extends Numeric { return $titles; } + } diff --git a/lib/Views/node/Plugin/views/argument_default/Node.php b/lib/Views/node/Plugin/views/argument_default/Node.php index 298d9c7..bf293b0 100644 --- a/lib/Views/node/Plugin/views/argument_default/Node.php +++ b/lib/Views/node/Plugin/views/argument_default/Node.php @@ -15,9 +15,7 @@ use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase; * Default argument plugin to extract a node via menu_get_object * * This plugin actually has no options so it odes not need to do a great deal. - */ - -/** + * * @Plugin( * id = "node", * module = "node", @@ -25,6 +23,7 @@ use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase; * ) */ class Node extends ArgumentDefaultPluginBase { + function get_argument() { foreach (range(1, 3) as $i) { $node = menu_get_object('node', $i); @@ -37,4 +36,5 @@ class Node extends ArgumentDefaultPluginBase { return arg(1); } } + } diff --git a/lib/Views/node/Plugin/views/argument_validator/Node.php b/lib/Views/node/Plugin/views/argument_validator/Node.php index 5b47b5b..66f0004 100644 --- a/lib/Views/node/Plugin/views/argument_validator/Node.php +++ b/lib/Views/node/Plugin/views/argument_validator/Node.php @@ -13,9 +13,7 @@ use Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase; /** * Validate whether an argument is an acceptable node. - */ - -/** + * * @Plugin( * id = "node", * module = "node", @@ -23,6 +21,7 @@ use Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase; * ) */ class Node extends ArgumentValidatorPluginBase { + function option_definition() { $options = parent::option_definition(); $options['types'] = array('default' => array()); @@ -117,7 +116,7 @@ class Node extends ArgumentValidatorPluginBase { } return isset($types[$node->type]); - break; + case 'nids': $nids = new stdClass(); $nids->value = array($argument); @@ -150,4 +149,5 @@ class Node extends ArgumentValidatorPluginBase { return empty($test); } } + } diff --git a/lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php b/lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php index de35eb2..b924a5c 100644 --- a/lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php +++ b/lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php @@ -17,15 +17,14 @@ use Drupal\Core\Annotation\Plugin; * is history. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_history_user_timestamp", * module = "node" * ) */ class HistoryUserTimestamp extends Node { + function init(&$view, &$options) { parent::init($view, $options); global $user; @@ -92,4 +91,5 @@ class HistoryUserTimestamp extends Node { return $this->render_link(theme('mark', array('type' => $mark)), $values); } } + } diff --git a/lib/Views/node/Plugin/views/field/Link.php b/lib/Views/node/Plugin/views/field/Link.php index 08c82ac..d556850 100644 --- a/lib/Views/node/Plugin/views/field/Link.php +++ b/lib/Views/node/Plugin/views/field/Link.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to the node. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_link", * module = "node" @@ -57,4 +55,5 @@ class Link extends Entity { return $text; } } + } diff --git a/lib/Views/node/Plugin/views/field/LinkDelete.php b/lib/Views/node/Plugin/views/field/LinkDelete.php index 25b5861..24049dc 100644 --- a/lib/Views/node/Plugin/views/field/LinkDelete.php +++ b/lib/Views/node/Plugin/views/field/LinkDelete.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to delete a node. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_link_delete", * module = "node" @@ -40,4 +38,5 @@ class LinkDelete extends Link { $text = !empty($this->options['text']) ? $this->options['text'] : t('delete'); return $text; } + } diff --git a/lib/Views/node/Plugin/views/field/LinkEdit.php b/lib/Views/node/Plugin/views/field/LinkEdit.php index 152fa5f..1e59566 100644 --- a/lib/Views/node/Plugin/views/field/LinkEdit.php +++ b/lib/Views/node/Plugin/views/field/LinkEdit.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link node edit. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_link_edit", * module = "node" @@ -40,4 +38,5 @@ class LinkEdit extends Link { $text = !empty($this->options['text']) ? $this->options['text'] : t('edit'); return $text; } + } diff --git a/lib/Views/node/Plugin/views/field/Node.php b/lib/Views/node/Plugin/views/field/Node.php index aa21181..0a63389 100644 --- a/lib/Views/node/Plugin/views/field/Node.php +++ b/lib/Views/node/Plugin/views/field/Node.php @@ -16,9 +16,7 @@ use Drupal\Core\Annotation\Plugin; * - link_to_node default: Should this field have the checkbox "link to node" enabled by default. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node", * module = "node" @@ -89,4 +87,5 @@ class Node extends FieldPluginBase { $value = $this->get_value($values); return $this->render_link($this->sanitize_value($value), $values); } + } diff --git a/lib/Views/node/Plugin/views/field/Path.php b/lib/Views/node/Plugin/views/field/Path.php index c4dc0aa..dc72309 100644 --- a/lib/Views/node/Plugin/views/field/Path.php +++ b/lib/Views/node/Plugin/views/field/Path.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present the path to the node. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_path", * module = "node" @@ -56,4 +54,5 @@ class Path extends FieldPluginBase { $nid = $this->get_value($values, 'nid'); return url("node/$nid", array('absolute' => $this->options['absolute'])); } + } diff --git a/lib/Views/node/Plugin/views/field/Revision.php b/lib/Views/node/Plugin/views/field/Revision.php index 0d702f0..0216b8c 100644 --- a/lib/Views/node/Plugin/views/field/Revision.php +++ b/lib/Views/node/Plugin/views/field/Revision.php @@ -11,22 +11,17 @@ use Views\node\Plugin\views\field\Node; use Drupal\Core\Annotation\Plugin; /** - * Contains the basic 'node_revision' field handler. - */ - -/** * A basic node_revision handler. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_revision", * module = "node" * ) */ class Revision extends Node { + function init(&$view, &$options) { parent::init($view, $options); if (!empty($this->options['link_to_node_revision'])) { @@ -80,4 +75,5 @@ class Revision extends Node { } return $data; } + } diff --git a/lib/Views/node/Plugin/views/field/RevisionLink.php b/lib/Views/node/Plugin/views/field/RevisionLink.php index 595c14e..01d6e00 100644 --- a/lib/Views/node/Plugin/views/field/RevisionLink.php +++ b/lib/Views/node/Plugin/views/field/RevisionLink.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to a node revision. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_revision_link", * module = "node" @@ -75,4 +73,5 @@ class RevisionLink extends Link { } return array($node, $vid); } + } diff --git a/lib/Views/node/Plugin/views/field/RevisionLinkDelete.php b/lib/Views/node/Plugin/views/field/RevisionLinkDelete.php index 43f51f8..da56c71 100644 --- a/lib/Views/node/Plugin/views/field/RevisionLinkDelete.php +++ b/lib/Views/node/Plugin/views/field/RevisionLinkDelete.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present link to delete a node revision. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_revision_link_delete", * module = "node" @@ -45,4 +43,5 @@ class RevisionLinkDelete extends RevisionLink { return !empty($this->options['text']) ? $this->options['text'] : t('delete'); } + } diff --git a/lib/Views/node/Plugin/views/field/RevisionLinkRevert.php b/lib/Views/node/Plugin/views/field/RevisionLinkRevert.php index 661e8a1..ea47dc4 100644 --- a/lib/Views/node/Plugin/views/field/RevisionLinkRevert.php +++ b/lib/Views/node/Plugin/views/field/RevisionLinkRevert.php @@ -14,9 +14,7 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to revert a node to a revision. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_revision_link_revert", * module = "node" @@ -45,4 +43,5 @@ class RevisionLinkRevert extends RevisionLink { return !empty($this->options['text']) ? $this->options['text'] : t('revert'); } + } diff --git a/lib/Views/node/Plugin/views/field/Type.php b/lib/Views/node/Plugin/views/field/Type.php index e9be25b..187ec9a 100644 --- a/lib/Views/node/Plugin/views/field/Type.php +++ b/lib/Views/node/Plugin/views/field/Type.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to translate a node type into its readable form. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_type", * module = "node" * ) */ class Type extends Node { + function option_definition() { $options = parent::option_definition(); $options['machine_name'] = array('default' => FALSE, 'bool' => TRUE); @@ -58,4 +57,5 @@ class Type extends Node { $value = $this->get_value($values); return $this->render_link($this->render_name($value, $values), $values); } + } diff --git a/lib/Views/node/Plugin/views/filter/Access.php b/lib/Views/node/Plugin/views/filter/Access.php index f10e7a6..4779457 100644 --- a/lib/Views/node/Plugin/views/filter/Access.php +++ b/lib/Views/node/Plugin/views/filter/Access.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Filter by node_access records. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_access", * module = "node" * ) */ class Access extends FilterPluginBase { + function admin_summary() { } function operator_form(&$form, &$form_state) { } function can_expose() { @@ -49,4 +48,5 @@ class Access extends FilterPluginBase { $this->query->add_where('AND', $table . '.grant_view', 1, '>='); } } + } diff --git a/lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php b/lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php index 77095ec..89f800a 100644 --- a/lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php +++ b/lib/Views/node/Plugin/views/filter/HistoryUserTimestamp.php @@ -17,15 +17,14 @@ use Drupal\Core\Annotation\Plugin; * is history. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_history_user_timestamp", * module = "node" * ) */ class HistoryUserTimestamp extends FilterPluginBase { + // Don't display empty space where the operator would be. var $no_operator = TRUE; @@ -96,4 +95,5 @@ class HistoryUserTimestamp extends FilterPluginBase { return t('exposed'); } } + } diff --git a/lib/Views/node/Plugin/views/filter/Status.php b/lib/Views/node/Plugin/views/filter/Status.php index 3bd053f..95df7b8 100644 --- a/lib/Views/node/Plugin/views/filter/Status.php +++ b/lib/Views/node/Plugin/views/filter/Status.php @@ -14,21 +14,23 @@ use Drupal\Core\Annotation\Plugin; * Filter by published status. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_status", * module = "node" * ) */ class Status extends FilterPluginBase { + function admin_summary() { } + function operator_form(&$form, &$form_state) { } + function can_expose() { return FALSE; } function query() { $table = $this->ensure_my_table(); $this->query->add_where_expression($this->options['group'], "$table.status = 1 OR ($table.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0 AND ***VIEW_OWN_UNPUBLISHED_NODES*** = 1) OR ***BYPASS_NODE_ACCESS*** = 1"); } + } diff --git a/lib/Views/node/Plugin/views/filter/Type.php b/lib/Views/node/Plugin/views/filter/Type.php index 1908ac8..82637d1 100644 --- a/lib/Views/node/Plugin/views/filter/Type.php +++ b/lib/Views/node/Plugin/views/filter/Type.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Filter by node type. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_type", * module = "node" * ) */ class Type extends InOperator { + function get_value_options() { if (!isset($this->value_options)) { $this->value_title = t('Content types'); @@ -35,4 +34,5 @@ class Type extends InOperator { $this->value_options = $options; } } + } diff --git a/lib/Views/node/Plugin/views/filter/UidRevision.php b/lib/Views/node/Plugin/views/filter/UidRevision.php index 64a2988..d981a0d 100644 --- a/lib/Views/node/Plugin/views/filter/UidRevision.php +++ b/lib/Views/node/Plugin/views/filter/UidRevision.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Filter handler to check for revisions a certain user has created. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_uid_revision", * module = "node" * ) */ class UidRevision extends Name { + function query($group_by = FALSE) { $this->ensure_my_table(); @@ -34,4 +33,5 @@ class UidRevision extends Name { ((SELECT COUNT(*) FROM {node_revision} nr WHERE nr.uid IN($placeholder) AND nr.nid = $this->table_alias.nid) > 0)", array($placeholder => $args), $args); } + } diff --git a/lib/Views/node/Plugin/views/row/Rss.php b/lib/Views/node/Plugin/views/row/Rss.php index 1ee2ed4..f96e504 100644 --- a/lib/Views/node/Plugin/views/row/Rss.php +++ b/lib/Views/node/Plugin/views/row/Rss.php @@ -15,9 +15,7 @@ use stdClass; /** * Plugin which performs a node_view on the resulting object * and formats it as an RSS item. - */ - -/** + * * @Plugin( * id = "node_rss", * title = @Translation("Content"), @@ -31,8 +29,10 @@ use stdClass; * ) */ class Rss extends RowPluginBase { + // Basic properties that let the row style follow relationships. var $base_table = 'node'; + var $base_field = 'nid'; // Stores the nodes loaded with pre_render. @@ -192,4 +192,5 @@ class Rss extends RowPluginBase { 'row' => $item )); } + } diff --git a/lib/Views/node/Plugin/views/row/View.php b/lib/Views/node/Plugin/views/row/View.php index e0e06d0..579534b 100644 --- a/lib/Views/node/Plugin/views/row/View.php +++ b/lib/Views/node/Plugin/views/row/View.php @@ -17,9 +17,7 @@ use Drupal\views\Plugin\views\row\RowPluginBase; * Most of the code on this object is in the theme function. * * @ingroup views_row_plugins - */ - -/** + * * @Plugin( * id = "node", * module = "node", @@ -32,8 +30,10 @@ use Drupal\views\Plugin\views\row\RowPluginBase; * ) */ class View extends RowPluginBase { + // Basic properties that let the row style follow relationships. var $base_table = 'node'; + var $base_field = 'nid'; // Stores the nodes loaded with pre_render. @@ -124,4 +124,5 @@ class View extends RowPluginBase { return drupal_render($build); } + } diff --git a/lib/Views/search/Plugin/views/argument/Search.php b/lib/Views/search/Plugin/views/argument/Search.php index 449a29e..ba85da3 100644 --- a/lib/Views/search/Plugin/views/argument/Search.php +++ b/lib/Views/search/Plugin/views/argument/Search.php @@ -15,9 +15,7 @@ use Drupal\Core\Annotation\Plugin; * Argument that accepts query keys for search. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "search", * module = "search" @@ -110,4 +108,5 @@ class Search extends ArgumentPluginBase { $this->query->add_having_expression(0, "COUNT(*) >= $placeholder", array($placeholder => $matches)); } } + } diff --git a/lib/Views/search/Plugin/views/field/Score.php b/lib/Views/search/Plugin/views/field/Score.php index 132ef5e..c246c64 100644 --- a/lib/Views/search/Plugin/views/field/Score.php +++ b/lib/Views/search/Plugin/views/field/Score.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to provide simple renderer that allows linking to a node. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "search_score", * module = "search" * ) */ class Score extends Numeric { + function option_definition() { $options = parent::option_definition(); @@ -90,4 +89,5 @@ class Score extends Numeric { return parent::render($values); } } + } diff --git a/lib/Views/search/Plugin/views/filter/Search.php b/lib/Views/search/Plugin/views/filter/Search.php index f61a7af..7d39dc1 100644 --- a/lib/Views/search/Plugin/views/filter/Search.php +++ b/lib/Views/search/Plugin/views/filter/Search.php @@ -16,15 +16,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to provide simple renderer that allows linking to a node. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "search", * module = "search" * ) */ class Search extends FilterPluginBase { + var $always_multiple = TRUE; /** @@ -187,4 +186,5 @@ class Search extends FilterPluginBase { // Set to NULL to prevent PDO exception when views object is cached. $this->search_query = NULL; } + } diff --git a/lib/Views/search/Plugin/views/row/View.php b/lib/Views/search/Plugin/views/row/View.php index d8b67c8..2b2ab6d 100644 --- a/lib/Views/search/Plugin/views/row/View.php +++ b/lib/Views/search/Plugin/views/row/View.php @@ -22,6 +22,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class View extends RowPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -49,4 +50,5 @@ class View extends RowPluginBase { 'row' => $row )); } + } diff --git a/lib/Views/search/Plugin/views/sort/Score.php b/lib/Views/search/Plugin/views/sort/Score.php index 5b8e4b3..e5f74e0 100644 --- a/lib/Views/search/Plugin/views/sort/Score.php +++ b/lib/Views/search/Plugin/views/sort/Score.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to provide simple renderer that allows linking to a node. * * @ingroup views_sort_handlers - */ - -/** + * * @Plugin( * id = "search_score", * module = "search" * ) */ class Score extends SortPluginBase { + function query() { // Check to see if the search filter/argument added 'score' to the table. // Our filter stores it as $handler->search_score -- and we also @@ -41,4 +40,5 @@ class Score extends SortPluginBase { // Do absolutely nothing if there is no filter/argument in place; there is no reason to // sort on the raw scores with this handler. } + } diff --git a/lib/Views/statistics/Plugin/views/field/AccesslogPath.php b/lib/Views/statistics/Plugin/views/field/AccesslogPath.php index bf1595a..e9947d4 100644 --- a/lib/Views/statistics/Plugin/views/field/AccesslogPath.php +++ b/lib/Views/statistics/Plugin/views/field/AccesslogPath.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to provide simple renderer that turns a URL into a clickable link. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "statistics_accesslog_path", * module = "statistics" * ) */ class AccesslogPath extends FieldPluginBase { + /** * Override init function to provide generic option to link to node. */ @@ -67,4 +66,5 @@ class AccesslogPath extends FieldPluginBase { return $data; } + } diff --git a/lib/Views/system/Plugin/views/filter/Type.php b/lib/Views/system/Plugin/views/filter/Type.php index e7428c5..955a8b9 100644 --- a/lib/Views/system/Plugin/views/filter/Type.php +++ b/lib/Views/system/Plugin/views/filter/Type.php @@ -19,6 +19,7 @@ use Drupal\Core\Annotation\Plugin; * ) */ class Type extends InOperator { + function get_value_options() { if (!isset($this->value_options)) { $this->value_title = t('Type'); @@ -28,4 +29,5 @@ class Type extends InOperator { $this->value_options = $types; } } + } diff --git a/lib/Views/taxonomy/Plugin/views/argument/IndexTid.php b/lib/Views/taxonomy/Plugin/views/argument/IndexTid.php index 7803451..2686297 100644 --- a/lib/Views/taxonomy/Plugin/views/argument/IndexTid.php +++ b/lib/Views/taxonomy/Plugin/views/argument/IndexTid.php @@ -5,24 +5,23 @@ * Definition of views_handler_argument_term_node_tid. */ -/** - * Allow taxonomy term ID(s) as argument. - * - * @ingroup views_argument_handlers - */ - namespace Views\taxonomy\Plugin\views\argument; use Drupal\Core\Annotation\Plugin; use Drupal\views\Plugin\views\argument\ManyToOne; /** + * Allow taxonomy term ID(s) as argument. + * + * @ingroup views_argument_handlers + * * @Plugin( * id = "taxonomy_index_tid", * module = "taxonomy" * ) */ class IndexTid extends ManyToOne { + function option_definition() { $options = parent::option_definition(); $options['set_breadcrumb'] = array('default' => FALSE, 'bool' => TRUE); @@ -58,4 +57,5 @@ class IndexTid extends ManyToOne { } return $titles; } + } diff --git a/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepth.php b/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepth.php index 2e0b7d4..4f0df51 100644 --- a/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepth.php +++ b/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepth.php @@ -17,15 +17,14 @@ use Drupal\Core\Annotation\Plugin; * because it uses a subquery to find nodes with. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "taxonomy_index_tid_depth", * module = "taxonomy" * ) */ class IndexTidDepth extends ArgumentPluginBase { + function option_definition() { $options = parent::option_definition(); @@ -158,4 +157,5 @@ class IndexTidDepth extends ArgumentPluginBase { // TODO review text return t('No name'); } + } diff --git a/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepthModifier.php b/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepthModifier.php index e0138a7..18039d3 100644 --- a/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepthModifier.php +++ b/lib/Views/taxonomy/Plugin/views/argument/IndexTidDepthModifier.php @@ -17,17 +17,18 @@ use Drupal\Core\Annotation\Plugin; * because it uses a subquery to find nodes with. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "taxonomy_index_tid_depth_modifier", * module = "taxonomy" * ) */ class IndexTidDepthModifier extends ArgumentPluginBase { + function options_form(&$form, &$form_state) { } + function query($group_by = FALSE) { } + function pre_query() { // We don't know our argument yet, but it's based upon our position: $argument = isset($this->view->args[$this->position]) ? $this->view->args[$this->position] : NULL; @@ -73,4 +74,5 @@ class IndexTidDepthModifier extends ArgumentPluginBase { $handler->options['depth'] = $argument; } } + } diff --git a/lib/Views/taxonomy/Plugin/views/argument/Taxonomy.php b/lib/Views/taxonomy/Plugin/views/argument/Taxonomy.php index a0869ea..16bba16 100644 --- a/lib/Views/taxonomy/Plugin/views/argument/Taxonomy.php +++ b/lib/Views/taxonomy/Plugin/views/argument/Taxonomy.php @@ -14,10 +14,8 @@ use Drupal\Core\Annotation\Plugin; * Argument handler for basic taxonomy tid. * * @ingroup views_argument_handlers - */ - -/** - * @plugin( + * + * @Plugin( * id = "taxonomy", * module = "taxonomy" * ) @@ -38,4 +36,5 @@ class Taxonomy extends Numeric { // TODO review text return t('No name'); } + } diff --git a/lib/Views/taxonomy/Plugin/views/argument/VocabularyMachineName.php b/lib/Views/taxonomy/Plugin/views/argument/VocabularyMachineName.php index 8d1889e..1ba01ef 100644 --- a/lib/Views/taxonomy/Plugin/views/argument/VocabularyMachineName.php +++ b/lib/Views/taxonomy/Plugin/views/argument/VocabularyMachineName.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Argument handler to accept a vocabulary machine name. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "vocabulary_machine_name", * module = "taxonomy" * ) */ class VocabularyMachineName extends String { + /** * Override the behavior of title(). Get the name of the vocabulary.. */ @@ -35,4 +34,5 @@ class VocabularyMachineName extends String { return check_plain($title); } + } diff --git a/lib/Views/taxonomy/Plugin/views/argument/VocabularyVid.php b/lib/Views/taxonomy/Plugin/views/argument/VocabularyVid.php index 92b126e..b7d71df 100644 --- a/lib/Views/taxonomy/Plugin/views/argument/VocabularyVid.php +++ b/lib/Views/taxonomy/Plugin/views/argument/VocabularyVid.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\argument\Numeric; * Argument handler to accept a vocabulary id. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "vocabulary_vid", * module = "taxonomy" * ) */ class VocabularyVid extends Numeric { + /** * Override the behavior of title(). Get the name of the vocabulary. */ @@ -35,4 +34,5 @@ class VocabularyVid extends Numeric { return check_plain($title); } + } diff --git a/lib/Views/taxonomy/Plugin/views/argument_default/Tid.php b/lib/Views/taxonomy/Plugin/views/argument_default/Tid.php index bbf3e61..56b89f4 100644 --- a/lib/Views/taxonomy/Plugin/views/argument_default/Tid.php +++ b/lib/Views/taxonomy/Plugin/views/argument_default/Tid.php @@ -21,6 +21,7 @@ use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase; * ) */ class Tid extends ArgumentDefaultPluginBase { + function init(&$view, &$argument, $options) { parent::init($view, $argument, $options); @@ -165,4 +166,5 @@ class Tid extends ArgumentDefaultPluginBase { return $views_page->argument['tid']->argument; } } + } diff --git a/lib/Views/taxonomy/Plugin/views/argument_validate/Term.php b/lib/Views/taxonomy/Plugin/views/argument_validate/Term.php index b33ac44..4f8f48c 100644 --- a/lib/Views/taxonomy/Plugin/views/argument_validate/Term.php +++ b/lib/Views/taxonomy/Plugin/views/argument_validate/Term.php @@ -12,7 +12,6 @@ use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Translation; use Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase; - /** * Validate whether an argument is an acceptable node. * @@ -22,6 +21,7 @@ use Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase; * title = @Translation("Taxonomy term") */ class Term extends ArgumentValidatorPluginBase { + function init(&$view, &$argument, $options) { parent::init($view, $argument, $options); @@ -232,4 +232,5 @@ class Term extends ArgumentValidatorPluginBase { } } } + } diff --git a/lib/Views/taxonomy/Plugin/views/field/LinkEdit.php b/lib/Views/taxonomy/Plugin/views/field/LinkEdit.php index 16532a6..df2d91a 100644 --- a/lib/Views/taxonomy/Plugin/views/field/LinkEdit.php +++ b/lib/Views/taxonomy/Plugin/views/field/LinkEdit.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a term edit link. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "term_link_edit", * module = "taxonomy" * ) */ class LinkEdit extends FieldPluginBase { + function construct() { parent::construct(); $this->additional_fields['tid'] = 'tid'; @@ -69,4 +68,5 @@ class LinkEdit extends FieldPluginBase { return l($text, 'taxonomy/term/'. $tid . '/edit', array('query' => drupal_get_destination())); } } + } diff --git a/lib/Views/taxonomy/Plugin/views/field/Taxonomy.php b/lib/Views/taxonomy/Plugin/views/field/Taxonomy.php index edcd6ec..60cc9c0 100644 --- a/lib/Views/taxonomy/Plugin/views/field/Taxonomy.php +++ b/lib/Views/taxonomy/Plugin/views/field/Taxonomy.php @@ -16,15 +16,14 @@ use Drupal\Core\Annotation\Plugin; * term. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "taxonomy", * module = "taxonomy" * ) */ class Taxonomy extends FieldPluginBase { + /** * Constructor to provide additional field to add. * @@ -96,4 +95,5 @@ class Taxonomy extends FieldPluginBase { $value = $this->get_value($values); return $this->render_link($this->sanitize_value($value), $values); } + } diff --git a/lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php b/lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php index 57d17d7..65f9509 100644 --- a/lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php +++ b/lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to display all taxonomy terms of a node. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "taxonomy_index_tid", * module = "taxonomy" * ) */ class TaxonomyIndexTid extends PrerenderList { + function init(&$view, &$options) { parent::init($view, $options); // @todo: Wouldn't it be possible to use $this->base_table and no if here? @@ -157,4 +156,5 @@ class TaxonomyIndexTid extends PrerenderList { $tokens['[' . $this->options['id'] . '-' . str_replace('_', '-', $token) . ']'] = isset($item[$token]) ? $item[$token] : ''; } } + } diff --git a/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php b/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php index 4310d78..20d9ed7 100644 --- a/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php +++ b/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\ManyToOne; * Filter by term id. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "taxonomy_index_tid", * module = "taxonomy" * ) */ class TaxonomyIndexTid extends ManyToOne { + // Stores the exposed input for this filter. var $validated_exposed_input = NULL; @@ -373,4 +372,5 @@ class TaxonomyIndexTid extends ManyToOne { } return parent::admin_summary(); } + } diff --git a/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTidDepth.php b/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTidDepth.php index 8f11971..9f4a2f3 100644 --- a/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTidDepth.php +++ b/lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTidDepth.php @@ -17,15 +17,14 @@ use Drupal\Core\Annotation\Plugin; * because it uses a subquery to find nodes with. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "taxonomy_index_tid_depth", * module = "taxonomy" * ) */ class TaxonomyIndexTidDepth extends TaxonomyIndexTid { + function operator_options($which = 'title') { return array( 'or' => t('Is one of'), @@ -109,4 +108,5 @@ class TaxonomyIndexTidDepth extends TaxonomyIndexTid { $subquery->condition($where); $this->query->add_where($this->options['group'], "$this->table_alias.$this->real_field", $subquery, 'IN'); } + } diff --git a/lib/Views/taxonomy/Plugin/views/filter/VocabularyMachineName.php b/lib/Views/taxonomy/Plugin/views/filter/VocabularyMachineName.php index 21d7bab..b591413 100644 --- a/lib/Views/taxonomy/Plugin/views/filter/VocabularyMachineName.php +++ b/lib/Views/taxonomy/Plugin/views/filter/VocabularyMachineName.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\InOperator; * Filter by vocabulary machine name. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "vocabulary_machine_name", * module = "taxonomy" * ) */ class VocabularyMachineName extends InOperator { + function get_value_options() { if (isset($this->value_options)) { return; @@ -34,4 +33,5 @@ class VocabularyMachineName extends InOperator { $this->value_options[$voc->machine_name] = $voc->name; } } + } diff --git a/lib/Views/taxonomy/Plugin/views/filter/VocabularyVid.php b/lib/Views/taxonomy/Plugin/views/filter/VocabularyVid.php index bac7276..4074cf3 100644 --- a/lib/Views/taxonomy/Plugin/views/filter/VocabularyVid.php +++ b/lib/Views/taxonomy/Plugin/views/filter/VocabularyVid.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\InOperator; * Filter by vocabulary id. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "vocabulary_vid", * module = "taxonomy" * ) */ class VocabularyVid extends InOperator { + function get_value_options() { if (isset($this->value_options)) { return; @@ -34,4 +33,5 @@ class VocabularyVid extends InOperator { $this->value_options[$voc->vid] = $voc->name; } } + } diff --git a/lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php b/lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php index d6b30da..42b9753 100644 --- a/lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php +++ b/lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php @@ -15,15 +15,14 @@ use Drupal\Core\Annotation\Plugin; * Relationship handler to return the taxonomy terms of nodes. * * @ingroup views_relationship_handlers - */ - -/** + * * @Plugin( * id = "node_term_data", * module = "taxonomy" * ) */ class NodeTermData extends RelationshipPluginBase { + function init(&$view, &$options) { parent::init($view, $options); @@ -105,4 +104,5 @@ class NodeTermData extends RelationshipPluginBase { $this->alias = $this->query->add_relationship($alias, $join, 'taxonomy_term_data', $this->relationship); } + } diff --git a/lib/Views/translation/Plugin/views/argument/NodeTnid.php b/lib/Views/translation/Plugin/views/argument/NodeTnid.php index ad7fc21..55788cd 100644 --- a/lib/Views/translation/Plugin/views/argument/NodeTnid.php +++ b/lib/Views/translation/Plugin/views/argument/NodeTnid.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Argument handler to accept a node translation id. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "node_tnid", * module = "translation" * ) */ class NodeTnid extends Numeric { + /** * Override the behavior of title(). Get the title of the node. */ @@ -35,4 +34,5 @@ class NodeTnid extends Numeric { } return $titles; } + } diff --git a/lib/Views/translation/Plugin/views/field/NodeLinkTranslate.php b/lib/Views/translation/Plugin/views/field/NodeLinkTranslate.php index d6268a1..40a44ce 100644 --- a/lib/Views/translation/Plugin/views/field/NodeLinkTranslate.php +++ b/lib/Views/translation/Plugin/views/field/NodeLinkTranslate.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link node translate. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_link_translate", * module = "translation" * ) */ class NodeLinkTranslate extends Link { + function render_link($data, $values) { // ensure user has access to edit this node. $node = $this->get_value($values); @@ -38,4 +37,5 @@ class NodeLinkTranslate extends Link { $text = !empty($this->options['text']) ? $this->options['text'] : t('translate'); return $text; } + } diff --git a/lib/Views/translation/Plugin/views/field/NodeTranslationLink.php b/lib/Views/translation/Plugin/views/field/NodeTranslationLink.php index e36c488..fd5456c 100644 --- a/lib/Views/translation/Plugin/views/field/NodeTranslationLink.php +++ b/lib/Views/translation/Plugin/views/field/NodeTranslationLink.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to the node. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "node_translation_link", * module = "translation" * ) */ class NodeTranslationLink extends FieldPluginBase { + function construct() { parent::construct(); $this->additional_fields['nid'] = 'nid'; @@ -58,4 +57,5 @@ class NodeTranslationLink extends FieldPluginBase { $this->options['alter']['path'] = "node/" . $this->get_value($values, 'nid'); return $this->get_value($values, 'title'); } + } diff --git a/lib/Views/translation/Plugin/views/filter/NodeTnid.php b/lib/Views/translation/Plugin/views/filter/NodeTnid.php index b4b2c49..7b7060e 100644 --- a/lib/Views/translation/Plugin/views/filter/NodeTnid.php +++ b/lib/Views/translation/Plugin/views/filter/NodeTnid.php @@ -14,16 +14,16 @@ use Drupal\Core\Annotation\Plugin; * Filter by whether the node is the original translation. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_tnid", * module = "translation" * ) */ class NodeTnid extends FilterPluginBase { + function admin_summary() { } + function option_definition() { $options = parent::option_definition(); @@ -54,4 +54,5 @@ class NodeTnid extends FilterPluginBase { // Select for source translations (tnid = nid). Conditionally, also accept either untranslated nodes (tnid = 0). $this->query->add_where_expression($this->options['group'], "$table.tnid = $table.nid" . ($this->operator ? " OR $table.tnid = 0" : '')); } + } diff --git a/lib/Views/translation/Plugin/views/filter/NodeTnidChild.php b/lib/Views/translation/Plugin/views/filter/NodeTnidChild.php index 0276c85..d543a5e 100644 --- a/lib/Views/translation/Plugin/views/filter/NodeTnidChild.php +++ b/lib/Views/translation/Plugin/views/filter/NodeTnidChild.php @@ -14,21 +14,23 @@ use Drupal\Core\Annotation\Plugin; * Filter by whether the node is not the original translation. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "node_tnid_child", * module = "translation" * ) */ class NodeTnidChild extends FilterPluginBase { + function admin_summary() { } + function operator_form(&$form, &$form_state) { } + function can_expose() { return FALSE; } function query() { $table = $this->ensure_my_table(); $this->query->add_where_expression($this->options['group'], "$table.tnid <> $table.nid AND $table.tnid > 0"); } + } diff --git a/lib/Views/translation/Plugin/views/relationship/Translation.php b/lib/Views/translation/Plugin/views/relationship/Translation.php index 6db57fe..8ed7104 100644 --- a/lib/Views/translation/Plugin/views/relationship/Translation.php +++ b/lib/Views/translation/Plugin/views/relationship/Translation.php @@ -16,15 +16,14 @@ use Drupal\Core\Annotation\Plugin; * options. * * @ingroup views_relationship_handlers - */ - -/** + * * @Plugin( * id = "translation", * module = "translation" * ) */ class Translation extends RelationshipPluginBase { + function option_definition() { $options = parent::option_definition(); $options['language'] = array('default' => 'current'); @@ -113,4 +112,5 @@ class Translation extends RelationshipPluginBase { $this->alias = $this->query->add_relationship($alias, $join, $this->definition['base'], $this->relationship); } + } diff --git a/lib/Views/user/Plugin/views/argument/RolesRid.php b/lib/Views/user/Plugin/views/argument/RolesRid.php index 554c617..040e4e0 100644 --- a/lib/Views/user/Plugin/views/argument/RolesRid.php +++ b/lib/Views/user/Plugin/views/argument/RolesRid.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\argument\ManyToOne; * Allow role ID(s) as argument. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "users_roles_rid", * module = "user" * ) */ class RolesRid extends ManyToOne { + function title_query() { $titles = array(); @@ -32,4 +31,5 @@ class RolesRid extends ManyToOne { } return $titles; } + } diff --git a/lib/Views/user/Plugin/views/argument/Uid.php b/lib/Views/user/Plugin/views/argument/Uid.php index 68efdf6..c53d2e4 100644 --- a/lib/Views/user/Plugin/views/argument/Uid.php +++ b/lib/Views/user/Plugin/views/argument/Uid.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\argument\Numeric; * Argument handler to accept a user id. * * @ingroup views_argument_handlers - */ - -/** + * * @Plugin( * id = "user_uid", * module = "user" * ) */ class Uid extends Numeric { + /** * Override the behavior of title(). Get the name of the user. * @@ -42,4 +41,5 @@ class Uid extends Numeric { } return $titles; } + } diff --git a/lib/Views/user/Plugin/views/argument_default/CurrentUser.php b/lib/Views/user/Plugin/views/argument_default/CurrentUser.php index f93955a..5939278 100644 --- a/lib/Views/user/Plugin/views/argument_default/CurrentUser.php +++ b/lib/Views/user/Plugin/views/argument_default/CurrentUser.php @@ -23,8 +23,10 @@ use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase; * ) */ class CurrentUser extends ArgumentDefaultPluginBase { + function get_argument() { global $user; return $user->uid; } + } diff --git a/lib/Views/user/Plugin/views/argument_default/User.php b/lib/Views/user/Plugin/views/argument_default/User.php index 15e7a66..d14b7a9 100644 --- a/lib/Views/user/Plugin/views/argument_default/User.php +++ b/lib/Views/user/Plugin/views/argument_default/User.php @@ -21,6 +21,7 @@ use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase; * ) */ class User extends ArgumentDefaultPluginBase { + function option_definition() { $options = parent::option_definition(); $options['user'] = array('default' => '', 'bool' => TRUE, 'translatable' => FALSE); @@ -86,4 +87,5 @@ class User extends ArgumentDefaultPluginBase { return $view->argument['uid']->argument; } } + } diff --git a/lib/Views/user/Plugin/views/argument_validator/User.php b/lib/Views/user/Plugin/views/argument_validator/User.php index 75619a1..fee8954 100644 --- a/lib/Views/user/Plugin/views/argument_validator/User.php +++ b/lib/Views/user/Plugin/views/argument_validator/User.php @@ -25,6 +25,7 @@ use Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase; * ) */ class User extends ArgumentValidatorPluginBase { + function option_definition() { $options = parent::option_definition(); $options['type'] = array('default' => 'uid'); @@ -149,4 +150,5 @@ class User extends ArgumentValidatorPluginBase { } } } + } diff --git a/lib/Views/user/Plugin/views/field/Language.php b/lib/Views/user/Plugin/views/field/Language.php index 09490c9..7093b11 100644 --- a/lib/Views/user/Plugin/views/field/Language.php +++ b/lib/Views/user/Plugin/views/field/Language.php @@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin; * Views field handler for user language. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_language", * module = "user" @@ -47,4 +45,5 @@ class Language extends User { $value = $this->get_value($values); return $this->render_link($this->sanitize_value($value), $values); } + } diff --git a/lib/Views/user/Plugin/views/field/Link.php b/lib/Views/user/Plugin/views/field/Link.php index acbc391..391d35a 100644 --- a/lib/Views/user/Plugin/views/field/Link.php +++ b/lib/Views/user/Plugin/views/field/Link.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to the user. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_link", * module = "user" * ) */ class Link extends FieldPluginBase { + function construct() { parent::construct(); $this->additional_fields['uid'] = 'uid'; diff --git a/lib/Views/user/Plugin/views/field/LinkCancel.php b/lib/Views/user/Plugin/views/field/LinkCancel.php index c7323f8..1ddcdc5 100644 --- a/lib/Views/user/Plugin/views/field/LinkCancel.php +++ b/lib/Views/user/Plugin/views/field/LinkCancel.php @@ -13,9 +13,7 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to user cancel. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_link_cancel", * module = "user" @@ -41,4 +39,5 @@ class LinkCancel extends Link { return $text; } } + } diff --git a/lib/Views/user/Plugin/views/field/LinkEdit.php b/lib/Views/user/Plugin/views/field/LinkEdit.php index ffe7603..0c464b0 100644 --- a/lib/Views/user/Plugin/views/field/LinkEdit.php +++ b/lib/Views/user/Plugin/views/field/LinkEdit.php @@ -13,15 +13,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to present a link to user edit. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_link_edit", * module = "user" * ) */ class LinkEdit extends Link { + function render_link($data, $values) { // Build a pseudo account object to be able to check the access. $account = entity_create('user', array()); @@ -38,4 +37,5 @@ class LinkEdit extends Link { return $text; } } + } diff --git a/lib/Views/user/Plugin/views/field/Mail.php b/lib/Views/user/Plugin/views/field/Mail.php index 3961a82..a310c2f 100644 --- a/lib/Views/user/Plugin/views/field/Mail.php +++ b/lib/Views/user/Plugin/views/field/Mail.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to provide acess control for the email field. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_mail", * module = "user" * ) */ class Mail extends User { + function option_definition() { $options = parent::option_definition(); $options['link_to_user'] = array('default' => 'mailto'); @@ -53,4 +52,5 @@ class Mail extends User { return $data; } + } diff --git a/lib/Views/user/Plugin/views/field/Name.php b/lib/Views/user/Plugin/views/field/Name.php index 05fb5a7..fda961d 100644 --- a/lib/Views/user/Plugin/views/field/Name.php +++ b/lib/Views/user/Plugin/views/field/Name.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to provide simple renderer that allows using a themed user link. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_name", * module = "user" * ) */ class Name extends User { + /** * Add uid in the query so we can test for anonymous if needed. */ @@ -94,4 +93,5 @@ class Name extends User { // Otherwise, there's no special handling, so return the data directly. return $data; } + } diff --git a/lib/Views/user/Plugin/views/field/Permissions.php b/lib/Views/user/Plugin/views/field/Permissions.php index 6540645..1247a1d 100644 --- a/lib/Views/user/Plugin/views/field/Permissions.php +++ b/lib/Views/user/Plugin/views/field/Permissions.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\field\PrerenderList; * Field handler to provide a list of permissions. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_permissions", * module = "user" * ) */ class Permissions extends PrerenderList { + function construct() { parent::construct(); $this->additional_fields['uid'] = array('table' => 'users', 'field' => 'uid'); @@ -77,4 +76,5 @@ class Permissions extends PrerenderList { $tokens['[' . $this->options['id'] . '-rid' . ']'] = $item['rid']; } */ + } diff --git a/lib/Views/user/Plugin/views/field/Picture.php b/lib/Views/user/Plugin/views/field/Picture.php index bbe1e29..3f7108b 100644 --- a/lib/Views/user/Plugin/views/field/Picture.php +++ b/lib/Views/user/Plugin/views/field/Picture.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\field\FieldPluginBase; * Field handler to provide simple renderer that allows using a themed user link. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_picture", * module = "user" * ) */ class Picture extends FieldPluginBase { + function construct() { parent::construct(); $this->additional_fields['uid'] = 'uid'; @@ -123,4 +122,5 @@ class Picture extends FieldPluginBase { return $output; } + } diff --git a/lib/Views/user/Plugin/views/field/Roles.php b/lib/Views/user/Plugin/views/field/Roles.php index 50b1b3d..79305fa 100644 --- a/lib/Views/user/Plugin/views/field/Roles.php +++ b/lib/Views/user/Plugin/views/field/Roles.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\field\PrerenderList; * Field handler to provide a list of roles. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user_roles", * module = "user" * ) */ class Roles extends PrerenderList { + function construct() { parent::construct(); $this->additional_fields['uid'] = array('table' => 'users', 'field' => 'uid'); @@ -66,4 +65,5 @@ class Roles extends PrerenderList { $tokens['[' . $this->options['id'] . '-rid' . ']'] = $item['rid']; } } + } diff --git a/lib/Views/user/Plugin/views/field/User.php b/lib/Views/user/Plugin/views/field/User.php index e006b5b..6bd96b8 100644 --- a/lib/Views/user/Plugin/views/field/User.php +++ b/lib/Views/user/Plugin/views/field/User.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Field handler to provide simple renderer that allows linking to a user. * * @ingroup views_field_handlers - */ - -/** + * * @Plugin( * id = "user", * module = "user" * ) */ class User extends FieldPluginBase { + /** * Override init function to provide generic option to link to user. */ @@ -64,4 +63,5 @@ class User extends FieldPluginBase { $value = $this->get_value($values); return $this->render_link($this->sanitize_value($value), $values); } + } diff --git a/lib/Views/user/Plugin/views/filter/Current.php b/lib/Views/user/Plugin/views/filter/Current.php index 26fed73..bed0c9d 100644 --- a/lib/Views/user/Plugin/views/filter/Current.php +++ b/lib/Views/user/Plugin/views/filter/Current.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\BooleanOperator; * Filter handler for the current user. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "user_current", * module = "user" * ) */ class Current extends BooleanOperator { + function construct() { parent::construct(); $this->value_value = t('Is the logged in user'); @@ -45,4 +44,5 @@ class Current extends BooleanOperator { } $this->query->add_where($this->options['group'], $or); } + } diff --git a/lib/Views/user/Plugin/views/filter/Name.php b/lib/Views/user/Plugin/views/filter/Name.php index 9d0a08c..515fd85 100644 --- a/lib/Views/user/Plugin/views/filter/Name.php +++ b/lib/Views/user/Plugin/views/filter/Name.php @@ -14,15 +14,14 @@ use Drupal\Core\Annotation\Plugin; * Filter handler for usernames. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "user_name", * module = "user" * ) */ class Name extends InOperator { + var $always_multiple = TRUE; function value_form(&$form, &$form_state) { @@ -171,4 +170,5 @@ class Name extends InOperator { return parent::admin_summary(); } + } diff --git a/lib/Views/user/Plugin/views/filter/Permissions.php b/lib/Views/user/Plugin/views/filter/Permissions.php index c17eacc..47a94be 100644 --- a/lib/Views/user/Plugin/views/filter/Permissions.php +++ b/lib/Views/user/Plugin/views/filter/Permissions.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\ManyToOne; * Filter handler for user roles. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "user_permissions", * module = "user" * ) */ class Permissions extends ManyToOne { + function get_value_options() { $module_info = system_get_info('module'); @@ -44,4 +43,5 @@ class Permissions extends ManyToOne { } } } + } diff --git a/lib/Views/user/Plugin/views/filter/Roles.php b/lib/Views/user/Plugin/views/filter/Roles.php index 411ee50..ef44ce8 100644 --- a/lib/Views/user/Plugin/views/filter/Roles.php +++ b/lib/Views/user/Plugin/views/filter/Roles.php @@ -14,15 +14,14 @@ use Drupal\views\Plugin\views\filter\ManyToOne; * Filter handler for user roles. * * @ingroup views_filter_handlers - */ - -/** + * * @Plugin( * id = "user_roles", * module = "user" * ) */ class Roles extends ManyToOne { + function get_value_options() { $this->value_options = user_roles(TRUE); unset($this->value_options[DRUPAL_AUTHENTICATED_RID]); @@ -37,4 +36,5 @@ class Roles extends ManyToOne { $operators['not empty']['title'] = t("Has roles in addition to 'authenticated user'"); return $operators; } + } diff --git a/lib/Views/user/Plugin/views/row/View.php b/lib/Views/user/Plugin/views/row/View.php index 025e4ad..94ca726 100644 --- a/lib/Views/user/Plugin/views/row/View.php +++ b/lib/Views/user/Plugin/views/row/View.php @@ -15,8 +15,7 @@ use Drupal\Core\Annotation\Translation; * A row plugin which renders a user via user_view. * * @ingroup views_row_plugins - */ -/** + * * @Plugin( * id = "user", * module = "user", @@ -29,6 +28,7 @@ use Drupal\Core\Annotation\Translation; * ) */ class View extends RowPluginBase { + var $base_table = 'users'; var $base_field = 'uid'; @@ -96,4 +96,5 @@ class View extends RowPluginBase { return drupal_render($build); } + }