Skip to content
Snippets Groups Projects
Commit 20378285 authored by Daniel Wehner's avatar Daniel Wehner Committed by Tim Plunkett
Browse files

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

parent 3d48f0aa
No related branches found
No related tags found
No related merge requests found
Showing
with 65 additions and 21 deletions
<?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 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_argument_aggregator_category_cid. * 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\views\Plugin\views\argument\Numeric;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_argument_aggregator_fid. * 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\views\Plugin\views\argument\Numeric;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_argument_aggregator_iid. * 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\views\Plugin\views\argument\Numeric;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_aggregator_category. * 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\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_aggregator_title_link. * 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\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_aggregator_xss. * 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\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_filter_aggregator_category_cid. * 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\views\Plugin\views\filter\InOperator;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Contains the Aggregator Item RSS row style plugin. * 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\views\Plugin\views\row\RowPluginBase;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Contains the book root from current node argument default plugin. * 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 Views\node\Plugin\views\argument_default\Node;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_argument_comment_user_uid. * 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\views\Plugin\views\argument\ArgumentPluginBase;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment. * 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\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_depth. * 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\Core\Annotation\Plugin;
use Drupal\views\Plugin\views\field\FieldPluginBase; use Drupal\views\Plugin\views\field\FieldPluginBase;
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* plugin_id = "comment_depth" * plugin_id = "comment_depth"
* ) * )
*/ */
class views_handler_field_comment_depth extends FieldPluginBase { class Depth extends FieldPluginBase {
/** /**
* Work out the depth of this comment * Work out the depth of this comment
*/ */
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_link_delete. * 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; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_last_comment_timestamp. * 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\views\Plugin\views\field\Date;
use Drupal\Core\Annotation\Plugin; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
* Definition of views_handler_field_comment_link. * 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\views\Plugin\views\field\Entity;
use Drupal\Core\Annotation\Plugin;
/** /**
* Base field handler to present a link. * Base field handler to present a link.
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_link_approve. * 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; use Drupal\Core\Annotation\Plugin;
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* plugin_id = "comment_link_approve" * plugin_id = "comment_link_approve"
* ) * )
*/ */
class views_handler_field_comment_link_approve extends Link { class LinkApprove extends Link {
function access() { function access() {
//needs permission to administer comments in general //needs permission to administer comments in general
return user_access('administer comments'); return user_access('administer comments');
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_link_edit. * 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; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_comment_link_reply. * 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; use Drupal\Core\Annotation\Plugin;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* Definition of views_handler_field_ncs_last_comment_name. * 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\Join;
use Drupal\views\Plugin\views\field\FieldPluginBase; use Drupal\views\Plugin\views\field\FieldPluginBase;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment