Skip to content

Instantly share code, notes, and snippets.

@damiankloip
Created January 28, 2013 15:27
Show Gist options
  • Save damiankloip/4656417 to your computer and use it in GitHub Desktop.
Save damiankloip/4656417 to your computer and use it in GitHub Desktop.
$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();
$query2 = $factory->get('view', 'OR')
->condition('display.*.display_options.enabled', NULL, 'IS NULL')
->condition('display.*.display_options.enabled', '0', '<>')
->execute();
dpm($query1, 'Q1');
dpm($query2, 'q2');
dpm($controller->load(array_diff_key($query1, $query2)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment