Skip to content

Instantly share code, notes, and snippets.

View damiankloip's full-sized avatar

Damian Lee damiankloip

View GitHub Profile
<?php
/**
* Get a full array of handlers for $type. This caches them.
*/
function get_handlers($type) {
if (!isset($this->handlers[$type])) {
$this->handlers[$type] = array();
$types = View::views_object_types();
$plural = $types[$type]['plural'];
diff --git a/includes/plugins.inc b/includes/plugins.inc
index 9618f8a..8e31e0a 100644
--- a/includes/plugins.inc
+++ b/includes/plugins.inc
@@ -19,7 +19,7 @@ function views_views_plugins() {
'default' => array(
'title' => t('Master'),
'help' => t('Default settings for this view.'),
- 'class' => 'Drupal\views\Plugins\views\display\Default',
+ 'class' => 'Drupal\views\Plugins\views\display\DefaultDisplay',
<?php
/**
* Fetch the plugin data from cache.
*/
function _views_fetch_plugin_data($type = NULL, $plugin_id = NULL, $reset = FALSE) {
if (!$type && !$plugin_id) {
$plugins = array();
$container = views_container();
foreach (array_keys($container->getDefinitions()) as $plugin_type) {
diff --git a/includes/admin.inc b/includes/admin.inc
index 0e57120..acb7425 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -4745,72 +4745,48 @@ function views_ui_admin_settings_basic() {
'#default_value' => $config->get('views_ui_always_live_preview'),
);
-// $form['live_preview']['views_ui_always_live_preview_button'] = array(
-// '#type' => 'checkbox',
diff --git a/handlers/views_handler_filter.inc b/handlers/views_handler_filter.inc
index de6dc9f..63a10c3 100644
--- a/handlers/views_handler_filter.inc
+++ b/handlers/views_handler_filter.inc
@@ -114,6 +114,7 @@ class views_handler_filter extends views_handler {
'contains' => array(
'operator_id' => array('default' => FALSE),
'label' => array('default' => '', 'translatable' => TRUE),
+ 'description' => array('default' => '', 'translatable' => TRUE),
'use_operator' => array('default' => FALSE, 'bool' => TRUE),
<?php
// TODO: This temp measure will be removed once we have a better way or
// separation of storage and the executed view.
$config_properties = array (
'disabled',
'api_version',
'name',
'description',
'tag',
<?php
/**
* @file
* Definition of Drupal\views\Tests\Plugin\FilterTest.
*/
namespace Drupal\views\Tests\Plugin;
use Drupal\views_test\Plugin\views\filter\FilterTest as FilterPlugin;
diff --git a/lib/Views/comment/Plugin/views/wizard/Comment.php b/lib/Views/comment/Plugin/views/wizard/Comment.php
index fe5cf6e..f783c9b 100644
--- a/lib/Views/comment/Plugin/views/wizard/Comment.php
+++ b/lib/Views/comment/Plugin/views/wizard/Comment.php
@@ -74,7 +74,7 @@ class Comment extends WizardPluginBase {
return $options;
}
- protected function build_form_style(&$form, &$form_state, $type) {
+ protected function build_form_style(array &$form, array &$form_state, $type) {
diff --git a/config/views.view.archive.yml b/config/views.view.archive.yml
index b9d4810..6e783bd 100644
--- a/config/views.view.archive.yml
+++ b/config/views.view.archive.yml
@@ -1,5 +1,6 @@
disabled: true
api_version: '3.0'
+module: node
name: archive
description: 'Display a list of months that link to content for that month.'
diff --git a/lib/Drupal/views/Plugin/views/HandlerBase.php b/lib/Drupal/views/Plugin/views/HandlerBase.php
index c40b4ea..87ad125 100644
--- a/lib/Drupal/views/Plugin/views/HandlerBase.php
+++ b/lib/Drupal/views/Plugin/views/HandlerBase.php
@@ -120,6 +120,11 @@ abstract class HandlerBase extends PluginBase {
$this->table = $options['table'];
}
+ // Allow alliases on both fields and tables.
+ if (isset($this->definition['real table'])) {