Commit 20378285 authored by dawehner's avatar dawehner Committed by tim.plunkett

Introduce a temporary Views vendor to integrate core modules into core.

parent 3d48f0aa
<?php
namespace Drupal\search;
/**
* Extends the core SearchQuery.
*
* @todo: Make this class PSR-0 compatible.
*/
class ViewsSearchQuery extends SearchQuery {
public function &conditions() {
return $this->conditions;
}
public function words() {
return $this->words;
}
public function simple() {
return $this->simple;
}
public function matches() {
return $this->matches;
}
public function publicParseSearchExpression() {
return $this->parseSearchExpression();
}
function condition_replace_string($search, $replace, &$condition) {
if ($condition['field'] instanceof DatabaseCondition) {
$conditions =& $condition['field']->conditions();
foreach ($conditions as $key => &$subcondition) {
if (is_numeric($key)) {
$this->condition_replace_string($search, $replace, $subcondition);
}
}
}
else {
$condition['field'] = str_replace($search, $replace, $condition['field']);
}
}
}
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_aggregator_category_cid.
*/
namespace Drupal\aggregator\Plugin\views\argument;
namespace Views\aggregator\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_aggregator_fid.
*/
namespace Drupal\aggregator\Plugin\views\argument;
namespace Views\aggregator\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_aggregator_iid.
*/
namespace Drupal\aggregator\Plugin\views\argument;
namespace Views\aggregator\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_aggregator_category.
*/
namespace Drupal\aggregator\Plugin\views\field;
namespace Views\aggregator\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_aggregator_title_link.
*/
namespace Drupal\aggregator\Plugin\views\field;
namespace Views\aggregator\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_aggregator_xss.
*/
namespace Drupal\aggregator\Plugin\views\field;
namespace Views\aggregator\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_aggregator_category_cid.
*/
namespace Drupal\aggregator\Plugin\views\filter;
namespace Views\aggregator\Plugin\views\filter;
use Drupal\views\Plugin\views\filter\InOperator;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Contains the Aggregator Item RSS row style plugin.
*/
namespace Drupal\aggregator\Plugin\views\row;
namespace Views\aggregator\Plugin\views\row;
use Drupal\views\Plugin\views\row\RowPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -4,7 +4,7 @@
* Contains the book root from current node argument default plugin.
*/
namespace Drupal\book\Plugin\views\argument_default;
namespace Views\book\Plugin\views\argument_default;
use Views\node\Plugin\views\argument_default\Node;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_comment_user_uid.
*/
namespace Drupal\comment\Plugin\views\argument;
namespace Views\comment\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\ArgumentPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_depth.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\field\FieldPluginBase;
......@@ -21,7 +21,7 @@
* plugin_id = "comment_depth"
* )
*/
class views_handler_field_comment_depth extends FieldPluginBase {
class Depth extends FieldPluginBase {
/**
* Work out the depth of this comment
*/
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_link_delete.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_last_comment_timestamp.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\Date;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,9 +5,10 @@
* Definition of views_handler_field_comment_link.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\Entity;
use Drupal\Core\Annotation\Plugin;
/**
* Base field handler to present a link.
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_link_approve.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
......@@ -20,7 +20,7 @@
* plugin_id = "comment_link_approve"
* )
*/
class views_handler_field_comment_link_approve extends Link {
class LinkApprove extends Link {
function access() {
//needs permission to administer comments in general
return user_access('administer comments');
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_link_edit.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_link_reply.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_ncs_last_comment_name.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Join;
use Drupal\views\Plugin\views\field\FieldPluginBase;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_ncs_last_updated.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\Date;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_node_comment.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_node_link.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\Entity;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_node_new_comments.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\Numeric;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_username.
*/
namespace Drupal\comment\Plugin\views\field;
namespace Views\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_ncs_last_updated.
*/
namespace Drupal\comment\Plugin\views\filter;
namespace Views\comment\Plugin\views\filter;
use Drupal\views\Plugin\views\filter\Date;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_node_comment.
*/
namespace Drupal\comment\Plugin\views\filter;
namespace Views\comment\Plugin\views\filter;
use Drupal\views\Plugin\views\filter\InOperator;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_comment_user_uid.
*/
namespace Drupal\comment\Plugin\views\filter;
namespace Views\comment\Plugin\views\filter;
use Drupal\views\Plugin\views\filter\FilterPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Contains the comment RSS row style plugin.
*/
namespace Drupal\comment\Plugin\views\row;
namespace Views\comment\Plugin\views\row;
use Drupal\views\Plugin\views\row\RowPluginBase;
use Drupal\Core\Annotation\Plugin;
......@@ -22,7 +22,7 @@
* base = {"comment"},
* uses_options = TRUE,
* type = "feed",
* help_topic" = "style-comment-rss"
* help_topic = "style-comment-rss"
* )
*/
class Rss extends RowPluginBase {
......
......@@ -5,7 +5,7 @@
* Contains the node RSS row style plugin.
*/
namespace Drupal\comment\Plugin\views\row;
namespace Views\comment\Plugin\views\row;
use Drupal\views\Plugin\views\row\RowPluginBase;
use Drupal\Core\Annotation\Plugin;
......@@ -22,7 +22,7 @@
* base = {"comment"},
* uses_options = TRUE,
* type = "normal",
* help_topic" = "style-comment"
* help_topic = "style-comment"
* )
*/
class View extends RowPluginBase {
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_sort_ncs_last_comment_name.
*/
namespace Drupal\comment\Plugin\views\sort;
namespace Views\comment\Plugin\views\sort;
use Drupal\views\Join;
use Drupal\views\Plugin\views\sort\SortPluginBase;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_sort_ncs_last_updated.
*/
namespace Drupal\comment\Plugin\views\sort;
namespace Views\comment\Plugin\views\sort;
use Drupal\views\Plugin\views\sort\Date;
use Drupal\Core\Annotation\Plugin;
......@@ -18,7 +18,7 @@
/**
* @Plugin(
* plugin_id = 'ncs_last_updated'
* plugin_id = "ncs_last_updated"
* )
*/
class NcsLastUpdated extends Date {
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_sort_comment_thread.
*/
namespace Drupal\comment\Plugin\views\sort;
namespace Views\comment\Plugin\views\sort;
use Drupal\views\Plugin\views\sort\SortPluginBase;
use Drupal\Core\Annotation\Plugin;
......@@ -18,7 +18,7 @@
/**
* @Plugin(
* plugin_id = 'comment_thread'
* plugin_id = "comment_thread"
* )
*/
class Thread extends SortPluginBase {
......
......@@ -5,9 +5,9 @@
* Definition of views_handler_field_contact_link.
*/
namespace Drupal\contact\Plugin\views\field;
namespace Views\contact\Plugin\views\field;
use Drupal\user\Plugins\views\field\UserLink;
use Views\user\Plugin\views\field\UserLink;
use Drupal\Core\Annotation\Plugin;
/**
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_field_list.
*/
namespace Drupal\field\Plugin\views\argument;
namespace Views\field\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\Numeric;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_field_list_text.
*/
namespace Drupal\field\Plugin\views\argument;
namespace Views\field\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\String;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_field.
*/
namespace Drupal\field\Plugin\views\field;
namespace Views\field\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_field_list.
*/
namespace Drupal\field\Plugin\views\filter;
namespace Views\field\Plugin\views\filter;
use Drupal\views\Plugin\views\filter\InOperator;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_relationship_entity_reverse.
*/
namespace Drupal\field\Plugin\views\relationship;
namespace Views\field\Plugin\views\relationship;
use Drupal\views\Join;
use Drupal\views\Plugin\views\relationship\RelationshipPluginBase;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_filter_format_name.
*/
namespace Drupal\filter\Plugin\views\field;
namespace Views\filter\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_locale_group.
*/
namespace Drupal\locale\Plugin\views\argument;
namespace Views\locale\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\ArgumentPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_locale_language.
*/
namespace Drupal\locale\Plugin\views\argument;
namespace Views\locale\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\ArgumentPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_locale_group.
*/
namespace Drupal\locale\Plugin\views\field;
namespace Views\locale\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_locale_language.
*/
namespace Drupal\locale\Plugin\views\field;
namespace Views\locale\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_field_locale_link_edit.
*/
namespace Drupal\locale\Plugin\views\field;
namespace Views\locale\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,9 +5,9 @@
* Definition of views_handler_field_node_language.
*/
namespace Drupal\locale\Plugin\views\field;
namespace Views\locale\Plugin\views\field;
use Drupal\node\Plugin\views\field\Node;
use Views\node\Plugin\views\field\Node;
use Drupal\Core\Annotation\Plugin;
/**
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_locale_group.
*/
namespace Drupal\locale\Plugin\views\filter;
namespace Views\locale\Plugin\views\filter;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\filter\InOperator;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_locale_language.
*/
namespace Drupal\locale\Plugin\views\filter;
namespace Views\locale\Plugin\views\filter;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\filter\InOperator;
......@@ -15,6 +15,12 @@
*
* @ingroup views_filter_handlers
*/
/**
* @Plugin(
* plugin_id = "locale_language"
* )
*/
class Language extends InOperator {
function get_value_options() {
if (!isset($this->value_options)) {
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_node_language.
*/
namespace Drupal\locale\Plugin\views\filter;
namespace Views\locale\Plugin\views\filter;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\filter\InOperator;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_filter_locale_version.
*/
namespace Drupal\locale\Plugin\views\filter;
namespace Views\locale\Plugin\views\filter;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\filter\InOperator;
......
<?php
namespace Drupal\node\Plugin\views\argument;
namespace Views\node\Plugin\views\argument;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\argument\Date;
......
<?php
namespace Drupal\node\Plugin\views\argument;
namespace Views\node\Plugin\views\argument;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\argument\Date;
......
<?php
namespace Drupal\node\Plugin\views\argument;
namespace Views\node\Plugin\views\argument;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\argument\Date;
......
<?php
namespace Drupal\node\Plugin\views\argument;
namespace Views\node\Plugin\views\argument;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\argument\Date;
......
<?php
namespace Drupal\node\Plugin\views\argument;
namespace Views\node\Plugin\views\argument;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\argument\Date;
......
<?php
namespace Drupal\node\Plugin\views\argument;
namespace Views\node\Plugin\views\argument;
use Drupal\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\argument\Date;
......
......@@ -5,7 +5,7 @@
* Definition of views_handler_argument_node_language.
*/
namespace Drupal\node\Plugin\views\argument;
namespace Views\node\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\ArgumentPluginBase;
use Drupal\Core\Annotation\Plugin;
......
......@@ -5,7 +5,7 @@
* Provide node nid argument handler.
*/
namespace Drupal\node\Plugin\views\argument;
namespace Views\node\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\Numeric;