Skip to content

Instantly share code, notes, and snippets.

View damiankloip's full-sized avatar

Damian Lee damiankloip

View GitHub Profile
$q = $factory->get('view', 'OR');
$q->notExists('disabled');
$and = $q->andConditionGroup()->exists('disabled')->condition('disabled', TRUE, '<>');
$q->condition($and);
dpm($q->execute());
$query = views_get_disabled_views();
$controller = entity_get_controller('view');
$factory = drupal_container()->get('entity.query');
$query1 = $factory->get('view')
->condition('display.*.display_options.path', NULL, 'IS NOT NULL')
->execute();
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
index bf7eca2..ed0681e 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php
@@ -139,7 +139,7 @@ class View extends ConfigEntityBase implements ViewStorageInterface {
public function get($property_name, $langcode = NULL) {
// Ensure that an executable View is available.
if ($property_name == 'executable' && !isset($this->{$property_name})) {
- $this->set('executable', new ViewExecutable($this));
+ $this->set('executable', drupal_container()->get('views.executable')->get($this));
<?php
/**
* @todo.
*/
abstract class ActionPluginBase extends PluginBase implements ActionInterface {
/**
* Implements ActionInterface::getParameter().
*/
$items = array('a', array(
'data' => 'b',
'children' => array('c', 'd'),
), 'e');
dpm(theme('item_list', array('items' => $items)));
diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/PreviewTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/PreviewTest.php
new file mode 100644
index 0000000..ee47782
--- /dev/null
+++ b/core/modules/views/lib/Drupal/views/Tests/UI/PreviewTest.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @file
<?php
$var = 'a';
switch ($var) {
case 'a':
if (FALSE) {
dpm('a');
}
case 'b':
<?php
/**
* Drush views execute command.
*/
function drush_views_execute($view_name, $display_id = 'default') {
$args = func_get_args();
$view_args = array();
// If it's more than 2, we have arguments. A display has to be specified in
diff --git a/lib/Views/aggregator/Plugin/views/argument/CategoryCid.php b/lib/Views/aggregator/Plugin/views/argument/CategoryCid.php
index 2be3fdd..06c16f5 100644
--- a/lib/Views/aggregator/Plugin/views/argument/CategoryCid.php
+++ b/lib/Views/aggregator/Plugin/views/argument/CategoryCid.php
@@ -28,10 +28,7 @@ class CategoryCid extends Numeric {
function title_query() {
$titles = array();
- $query = db_select('aggregator_category', 'c');
- $query->addField('c', 'title');
Storage
base_table node
name frontpage
description Emulates the default Drupal front page; you may set the default home page path to this view to make it your front page.
tag default
human_name Front page
core 8
api_version 3.0