diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 490470d..3bbf1ed 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -27,6 +27,13 @@ protected $originalID; /** + * The enabled/disabled status of the configuration entity. + * + * @var bool + */ + public $status; + + /** * Overrides Entity::__construct(). */ public function __construct(array $values, $entity_type) { @@ -89,6 +96,29 @@ public function set($property_name, $value, $langcode = NULL) { } /** + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::enable(). + */ + public function enable() { + $this->status = TRUE; + return $this; + } + + /** + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::disable(). + */ + public function disable() { + $this->status = FALSE; + return $this; + } + + /** + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::status(). + */ + public function status() { + return !empty($this->status); + } + + /** * Overrides Entity::createDuplicate(). */ public function createDuplicate() { diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php index 15ef4dd..8df5847 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php @@ -32,4 +32,27 @@ public function getOriginalID(); */ public function setOriginalID($id); + /** + * Enables the configuration entity. + * + * @return \Drupal\Core\Config\Entity\ConfigEntityInterface + * The configuration entity. + */ + public function enable(); + + /** + * Disables the configuration entity. + * + * @return \Drupal\Core\Config\Entity\ConfigEntityInterface + * The configuration entity. + */ + public function disable(); + + /** + * Returns whether the configuration entity is enabled. + * + * @return bool + */ + public function status(); + } diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php index 3977310..fbb10c0 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php @@ -7,6 +7,7 @@ namespace Drupal\Core\Config\Entity; +use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityListController; /** @@ -23,4 +24,31 @@ public function load() { return $entities; } + /** + * Overrides \Drupal\Core\Entity\EntityListController::getOperations(); + */ + public function getOperations(EntityInterface $entity) { + $operations = parent::getOperations($entity); + $uri = $entity->uri(); + + if (!$entity->status()) { + $operations['enable'] = array( + 'title' => t('Enable'), + 'href' => $uri['path'] . '/enable', + 'options' => $uri['options'], + 'weight' => -10, + ); + } + else { + $operations['disable'] = array( + 'title' => t('Disable'), + 'href' => $uri['path'] . '/disable', + 'options' => $uri['options'], + 'weight' => 20, + ); + } + + return $operations; + } + } diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index 3dd0b0a..3dda14c 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -58,6 +58,13 @@ class ConfigStorageController implements EntityStorageControllerInterface { protected $uuidKey = 'uuid'; /** + * Name of the entity's status key or FALSE if a status is not supported. + * + * @var string|bool + */ + protected $statusKey = 'status'; + + /** * Implements Drupal\Core\Entity\EntityStorageControllerInterface::__construct(). * * Sets basic variables. @@ -67,6 +74,13 @@ public function __construct($entityType) { $this->entityInfo = entity_get_info($entityType); $this->hookLoadArguments = array(); $this->idKey = $this->entityInfo['entity_keys']['id']; + + if (isset($this->entityInfo['entity_keys']['status'])) { + $this->statusKey = $this->entityInfo['entity_keys']['status']; + } + else { + $this->statusKey = FALSE; + } } /** @@ -248,6 +262,11 @@ public function create(array $values) { // entity object, for instance to fill-in default values. $this->invokeHook('create', $entity); + // Default status to enabled. + if (!empty($this->statusKey) && !isset($entity->{$this->statusKey})) { + $entity->{$this->statusKey} = TRUE; + } + return $entity; } diff --git a/core/modules/action/tests/action_bulk_test/config/views.view.test_bulk_form.yml b/core/modules/action/tests/action_bulk_test/config/views.view.test_bulk_form.yml index b1bb8eb..cee4ae2 100644 --- a/core/modules/action/tests/action_bulk_test/config/views.view.test_bulk_form.yml +++ b/core/modules/action/tests/action_bulk_test/config/views.view.test_bulk_form.yml @@ -143,6 +143,6 @@ display: display_options: path: test_bulk_form base_field: nid -disabled: '0' +status: '1' module: views langcode: und diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 6bc94f2..8bf4aae 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -365,19 +365,17 @@ function _block_rehash($theme = NULL) { $blocks = entity_load_multiple_by_properties('block', array('theme' => $theme)); foreach ($blocks as $block_id => $block) { $region = $block->get('region'); - $status = $block->get('status'); + $status = $block->status(); // Disable blocks in invalid regions. - if (!empty($region) && $region != BLOCK_REGION_NONE && !isset($regions[$region]) && $status == 1) { + if (!empty($region) && $region != BLOCK_REGION_NONE && !isset($regions[$region]) && $status) { drupal_set_message(t('The block %info was assigned to the invalid region %region and has been disabled.', array('%info' => $block_id, '%region' => $region)), 'warning'); // Disabled modules are moved into the BLOCK_REGION_NONE later so no // need to move the block to another region. - $block->set('status', 0); - $block->save(); + $block->disable()->save(); } - // Set region to none if not enabled and make sure status is set. - if (empty($status)) { + // Set region to none if not enabled. + if (!$status) { $block->set('region', BLOCK_REGION_NONE); - $block->set('status', 0); $block->save(); } } diff --git a/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php b/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php index 1bc4535..d2bf1a7 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php +++ b/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php @@ -31,7 +31,8 @@ * entity_keys = { * "id" = "id", * "label" = "label", - * "uuid" = "uuid" + * "uuid" = "uuid", + * "status" = "status" * } * ) */ @@ -101,13 +102,6 @@ class Block extends ConfigEntityBase { protected $module; /** - * The status of this block. - * - * @var bool - */ - protected $status = TRUE; - - /** * The plugin instance ID. * * @var string diff --git a/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block.yml b/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block.yml index 7e39b70..1ae6e85 100644 --- a/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block.yml +++ b/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block.yml @@ -2,7 +2,7 @@ base_field: id base_table: views_test_data core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block2.yml b/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block2.yml index 7c50c92..c0a9a12 100644 --- a/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block2.yml +++ b/core/modules/block/tests/block_test_views/test_views/views.view.test_view_block2.yml @@ -2,7 +2,7 @@ base_field: id base_table: views_test_data core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_rss.yml b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_rss.yml index 249fa76..a031c4c 100644 --- a/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_rss.yml +++ b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_rss.yml @@ -2,7 +2,7 @@ base_field: cid base_table: comment core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml index c3ef2e4..1898532 100644 --- a/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml +++ b/core/modules/comment/tests/modules/comment_test_views/test_views/views.view.test_comment_user_uid.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php index f19c03d..17b3af6 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityListTest.php @@ -54,20 +54,29 @@ function testList() { $uri = $entity->uri(); $expected_operations = array( 'edit' => array ( - 'title' => 'Edit', - 'href' => 'admin/structure/config_test/manage/default/edit', + 'title' => t('Edit'), + 'href' => $uri['path'] . '/edit', 'options' => $uri['options'], 'weight' => 10, ), + 'disable' => array( + 'title' => t('Disable'), + 'href' => $uri['path'] . '/disable', + 'options' => $uri['options'], + 'weight' => 20, + ), 'delete' => array ( - 'title' => 'Delete', - 'href' => 'admin/structure/config_test/manage/default/delete', + 'title' => t('Delete'), + 'href' => $uri['path'] . '/delete', 'options' => $uri['options'], 'weight' => 100, ), ); + $actual_operations = $controller->getOperations($entity); - $this->assertIdentical($expected_operations, $actual_operations, 'Return value from getOperations matches expected.'); + // Sort the operations to normalize link order. + uasort($actual_operations, 'drupal_sort_weight'); + $this->assertIdentical($expected_operations, $actual_operations); // Test buildHeader() method. $expected_items = array( diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusTest.php new file mode 100644 index 0000000..5519de5 --- /dev/null +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusTest.php @@ -0,0 +1,53 @@ + 'Configuration entity status', + 'description' => 'Tests configuration entity status functionality.', + 'group' => 'Configuration', + ); + } + + /** + * Tests the enabling/disabling of entities. + */ + function testCRUD() { + $entity = entity_create('config_test', array( + 'id' => strtolower($this->randomName()), + )); + $this->assertTrue($entity->status(), 'Default status is enabled.'); + $entity->save(); + $this->assertTrue($entity->status(), 'Status is enabled after saving.'); + + $entity->disable()->save(); + $this->assertFalse($entity->status(), 'Entity is disabled after disabling.'); + + $entity->enable()->save(); + $this->assertTrue($entity->status(), 'Entity is enabled after enabling.'); + + $entity = entity_load('config_test', $entity->id()); + $this->assertTrue($entity->status(), 'Status is enabled after reload.'); + } + +} diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusUITest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusUITest.php new file mode 100644 index 0000000..d33998d --- /dev/null +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityStatusUITest.php @@ -0,0 +1,59 @@ + 'Configuration entity status UI', + 'description' => 'Tests configuration entity status UI functionality.', + 'group' => 'Configuration', + ); + } + + /** + * Tests status operations. + */ + function testCRUD() { + $id = strtolower($this->randomName()); + $edit = array( + 'id' => $id, + 'label' => $this->randomName(), + ); + $this->drupalPost('admin/structure/config_test/add', $edit, 'Save'); + + // Disable an entity. + $disable_path = "admin/structure/config_test/manage/$id/disable"; + $this->assertLinkByHref($disable_path); + $this->drupalGet($disable_path); + $this->assertResponse(200); + $this->assertNoLinkByHref($disable_path); + + // Enable an entity. + $enable_path = "admin/structure/config_test/manage/$id/enable"; + $this->assertLinkByHref($enable_path); + $this->drupalGet($enable_path); + $this->assertResponse(200); + $this->assertNoLinkByHref($enable_path); + } + +} diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php index 5e62521..1c39242 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportTest.php @@ -107,6 +107,7 @@ function testNew() { 'uuid' => '30df59bd-7b03-4cf7-bb35-d42fc49f0651', 'label' => 'New', 'style' => '', + 'status' => '1', 'langcode' => 'und', 'protected_property' => '', ); diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php index b91fd39..38641f8 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php @@ -59,6 +59,7 @@ function testImport() { 'uuid' => '30df59bd-7b03-4cf7-bb35-d42fc49f0651', 'label' => 'New', 'style' => '', + 'status' => '1', 'langcode' => 'und', 'protected_property' => '', ); diff --git a/core/modules/config/tests/config_test/config/config_test.dynamic.default.yml b/core/modules/config/tests/config_test/config/config_test.dynamic.default.yml index fefeed5..5a8810d 100644 --- a/core/modules/config/tests/config_test/config/config_test.dynamic.default.yml +++ b/core/modules/config/tests/config_test/config/config_test.dynamic.default.yml @@ -1,3 +1,5 @@ id: default label: Default protected_property: Default +# Intentionally commented out to verify default status behavior. +# status: 1 diff --git a/core/modules/config/tests/config_test/config_test.module b/core/modules/config/tests/config_test/config_test.module index 67c3056..3ae9059 100644 --- a/core/modules/config/tests/config_test/config_test.module +++ b/core/modules/config/tests/config_test/config_test.module @@ -6,6 +6,7 @@ */ use Drupal\config_test\Plugin\Core\Entity\ConfigTest; +use Symfony\Component\HttpFoundation\RedirectResponse; require_once dirname(__FILE__) . '/config_test.hooks.inc'; @@ -54,6 +55,18 @@ function config_test_menu() { 'access callback' => TRUE, 'type' => MENU_LOCAL_TASK, ); + $items['admin/structure/config_test/manage/%config_test/enable'] = array( + 'title' => 'Enable', + 'page callback' => 'config_test_entity_enable', + 'page arguments' => array(4), + 'access callback' => TRUE, + ); + $items['admin/structure/config_test/manage/%config_test/disable'] = array( + 'title' => 'Disable', + 'page callback' => 'config_test_entity_disable', + 'page arguments' => array(4), + 'access callback' => TRUE, + ); return $items; } @@ -146,3 +159,25 @@ function config_test_config_test_create(ConfigTest $config_test) { $config_test->set('foo', 'baz'); } } + +/** + * Enables a ConfigTest object. + * + * @param Drupal\config_test\ConfigTest $config_test + * The ConfigTest object to enable. + */ +function config_test_entity_enable(ConfigTest $config_test) { + $config_test->enable()->save(); + return new RedirectResponse(url('admin/structure/config_test', array('absolute' => TRUE))); +} + +/** + * Disables a ConfigTest object. + * + * @param Drupal\config_test\ConfigTest $config_test + * The ConfigTest object to disable. + */ +function config_test_entity_disable(ConfigTest $config_test) { + $config_test->disable()->save(); + return new RedirectResponse(url('admin/structure/config_test', array('absolute' => TRUE))); +} diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php index 574c100..bfcede5 100644 --- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php +++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Plugin/Core/Entity/ConfigTest.php @@ -28,7 +28,8 @@ * entity_keys = { * "id" = "id", * "label" = "label", - * "uuid" = "uuid" + * "uuid" = "uuid", + * "status" = "status" * } * ) */ diff --git a/core/modules/field/tests/modules/field_test_views/test_views/views.view.test_view_fieldapi.yml b/core/modules/field/tests/modules/field_test_views/test_views/views.view.test_view_fieldapi.yml index 914a79c..6212754 100644 --- a/core/modules/field/tests/modules/field_test_views/test_views/views.view.test_view_fieldapi.yml +++ b/core/modules/field/tests/modules/field_test_views/test_views/views.view.test_view_fieldapi.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 3ff344c..dfb5d68 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -217,8 +217,7 @@ function filter_format_load($format_id) { * The text format object to be disabled. */ function filter_format_disable($format) { - $format->status = 0; - $format->save(); + $format->disable()->save(); // Allow modules to react on text format deletion. module_invoke_all('filter_format_disable', $format); @@ -351,7 +350,7 @@ function filter_formats($account = NULL) { $filter_formats = entity_load_multiple('filter_format'); $formats['all'] = array(); foreach ($filter_formats as $format_name => $filter_format) { - if (!empty($filter_format->status)) { + if ($filter_format->status()) { $formats['all'][$format_name] = $filter_format; } } @@ -776,7 +775,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE, if (in_array($filter_info[$name]['type'], $filter_types_to_skip)) { continue; } - if ($filter->status && isset($filter_info[$name]['prepare callback'])) { + if (!empty($filter->status) && isset($filter_info[$name]['prepare callback'])) { $function = $filter_info[$name]['prepare callback']; $text = $function($text, $filter, $format, $langcode, $cache, $cache_id); } @@ -788,7 +787,7 @@ function check_markup($text, $format_id = NULL, $langcode = '', $cache = FALSE, if (in_array($filter_info[$name]['type'], $filter_types_to_skip)) { continue; } - if ($filter->status && isset($filter_info[$name]['process callback'])) { + if (!empty($filter->status) && isset($filter_info[$name]['process callback'])) { $function = $filter_info[$name]['process callback']; $text = $function($text, $filter, $format, $langcode, $cache, $cache_id); } @@ -1062,7 +1061,7 @@ function _filter_tips($format_id, $long = FALSE) { $filters = filter_list_format($format->format); $tips[$format->name] = array(); foreach ($filters as $name => $filter) { - if ($filter->status && isset($filter_info[$name]['tips callback'])) { + if (!empty($filter->status) && isset($filter_info[$name]['tips callback'])) { $tip = $filter_info[$name]['tips callback']($filter, $format, $long); if (isset($tip)) { $tips[$format->name][$name] = array('tip' => $tip, 'id' => $name); diff --git a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php index 4bf976a..54b3363 100644 --- a/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php +++ b/core/modules/filter/lib/Drupal/filter/Plugin/Core/Entity/FilterFormat.php @@ -23,7 +23,8 @@ * entity_keys = { * "id" = "format", * "label" = "name", - * "uuid" = "uuid" + * "uuid" = "uuid", + * "status" = "status" * } * ) */ @@ -59,13 +60,6 @@ class FilterFormat extends ConfigEntityBase { public $uuid; /** - * Whether the text format is enabled or disabled. - * - * @var bool - */ - public $status = 1; - - /** * Weight of this format in the text format selector. * * The first/lowest text format that is accessible for a user is used as diff --git a/core/modules/node/lib/Drupal/node/Tests/Views/StatusExtraTest.php b/core/modules/node/lib/Drupal/node/Tests/Views/StatusExtraTest.php index ecd09b5..a7f2ea6 100644 --- a/core/modules/node/lib/Drupal/node/Tests/Views/StatusExtraTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/Views/StatusExtraTest.php @@ -35,7 +35,8 @@ public static function getInfo() { public function testStatusExtra() { // @todo For whatever reason the menu has to be rebuilt or drupalGet will // fail. - state()->set('menu_rebuild_needed', TRUE); + menu_router_rebuild(); + $column_map = array('nid' => 'nid'); $node_author = $this->drupalCreateUser(array('view own unpublished content')); $node_author_not_unpublished = $this->drupalCreateUser(); diff --git a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_field_type.yml b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_field_type.yml index a031aab..6a82e88 100644 --- a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_field_type.yml +++ b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_field_type.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_filter_node_uid_revision.yml b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_filter_node_uid_revision.yml index 120999d..e6b276a 100644 --- a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_filter_node_uid_revision.yml +++ b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_filter_node_uid_revision.yml @@ -1,7 +1,7 @@ base_table: node core: 8.0-dev description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_status_extra.yml b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_status_extra.yml index e4a140d..c6ce1fe 100644 --- a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_status_extra.yml +++ b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_status_extra.yml @@ -129,6 +129,6 @@ display: id: page position: '0' base_field: nid -disabled: '0' +status: '1' module: views langcode: und diff --git a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_entity.yml b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_entity.yml index 9fd8876..2992026 100644 --- a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_entity.yml +++ b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_entity.yml @@ -43,6 +43,6 @@ display: access: false path: test/serialize/entity base_field: id -disabled: '0' +status: '1' module: rest langcode: und diff --git a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_field.yml b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_field.yml index 1afee8f..206a534 100644 --- a/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_field.yml +++ b/core/modules/rest/tests/modules/rest_test_views/test_views/views.view.test_serializer_display_field.yml @@ -88,6 +88,6 @@ display: row: type: data_field base_field: id -disabled: '0' +status: '1' module: rest langcode: und diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_groupwise_term.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_groupwise_term.yml index 7a9cacd..d4c10d8 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_groupwise_term.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_groupwise_term.yml @@ -2,7 +2,7 @@ base_field: tid base_table: taxonomy_term_data core: 8.0-dev description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml index 02db809..d2c6b1a 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_taxonomy_node_term_data.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/translation_entity/tests/modules/translation_entity_test_views/test_views/views.view.test_entity_translations_link.yml b/core/modules/translation_entity/tests/modules/translation_entity_test_views/test_views/views.view.test_entity_translations_link.yml index c431338..7554f82 100644 --- a/core/modules/translation_entity/tests/modules/translation_entity_test_views/test_views/views.view.test_entity_translations_link.yml +++ b/core/modules/translation_entity/tests/modules/translation_entity_test_views/test_views/views.view.test_entity_translations_link.yml @@ -2,7 +2,7 @@ base_field: uid base_table: users core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_access_perm.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_access_perm.yml index cab4e3f..f3b8e63 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_access_perm.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_access_perm.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_access_role.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_access_role.yml index e8df49d..a45c58f 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_access_role.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_access_role.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_groupwise_user.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_groupwise_user.yml index 8b09600..e67b1e9 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_groupwise_user.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_groupwise_user.yml @@ -2,7 +2,7 @@ base_field: uid base_table: users core: 8.0-dev description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_plugin_argument_default_current_user.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_plugin_argument_default_current_user.yml index 40b8ff1..1a6c66b 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_plugin_argument_default_current_user.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_plugin_argument_default_current_user.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_name.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_name.yml index 3288594..3d42459 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_name.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_name.yml @@ -1,7 +1,7 @@ base_table: users core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_relationship.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_relationship.yml index 3c19d4e..87c4f84 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_relationship.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_relationship.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_uid_argument.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_uid_argument.yml index 6309f8a..d001a23 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_uid_argument.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_user_uid_argument.yml @@ -1,7 +1,7 @@ base_table: users core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_view_argument_validate_user.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_view_argument_validate_user.yml index dba19db..8d6fb8b 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_view_argument_validate_user.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_view_argument_validate_user.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_role.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_role.yml index 193c15b..4de07f2 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_role.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_role.yml @@ -2,7 +2,7 @@ base_field: uid base_table: users core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_user_name.yml b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_user_name.yml index f068501..67376d9 100644 --- a/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_user_name.yml +++ b/core/modules/user/tests/modules/user_test_views/test_views/views.view.test_views_handler_field_user_name.yml @@ -1,7 +1,7 @@ base_table: users core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/config/views.view.archive.yml b/core/modules/views/config/views.view.archive.yml index 1623e79..3645f81 100644 --- a/core/modules/views/config/views.view.archive.yml +++ b/core/modules/views/config/views.view.archive.yml @@ -1,4 +1,4 @@ -disabled: true +status: '0' module: node id: archive description: 'A list of months that link to content for that month.' diff --git a/core/modules/views/config/views.view.backlinks.yml b/core/modules/views/config/views.view.backlinks.yml index 58de2ca..03f3d94 100644 --- a/core/modules/views/config/views.view.backlinks.yml +++ b/core/modules/views/config/views.view.backlinks.yml @@ -1,4 +1,4 @@ -disabled: true +status: '0' module: search id: backlinks description: 'A list of other content items which have a link to the content item.' diff --git a/core/modules/views/config/views.view.comments_recent.yml b/core/modules/views/config/views.view.comments_recent.yml index 57aab63..88eb3ef 100644 --- a/core/modules/views/config/views.view.comments_recent.yml +++ b/core/modules/views/config/views.view.comments_recent.yml @@ -1,4 +1,4 @@ -disabled: true +status: '0' module: comment id: comments_recent description: 'A block and a page with recent comments.' diff --git a/core/modules/views/config/views.view.frontpage.yml b/core/modules/views/config/views.view.frontpage.yml index 09c507d..efac48c 100644 --- a/core/modules/views/config/views.view.frontpage.yml +++ b/core/modules/views/config/views.view.frontpage.yml @@ -1,4 +1,4 @@ -disabled: true +status: '0' module: node id: 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.' diff --git a/core/modules/views/config/views.view.glossary.yml b/core/modules/views/config/views.view.glossary.yml index 6ac297a..a9f4754 100644 --- a/core/modules/views/config/views.view.glossary.yml +++ b/core/modules/views/config/views.view.glossary.yml @@ -1,4 +1,4 @@ -disabled: true +status: '0' module: node id: glossary description: 'A list of all content, by letter.' diff --git a/core/modules/views/config/views.view.taxonomy_term.yml b/core/modules/views/config/views.view.taxonomy_term.yml index 704bb67..677fe65 100644 --- a/core/modules/views/config/views.view.taxonomy_term.yml +++ b/core/modules/views/config/views.view.taxonomy_term.yml @@ -1,4 +1,4 @@ -disabled: true +status: '0' module: taxonomy id: taxonomy_term description: 'Customize the default taxonomy/term display.' diff --git a/core/modules/views/config/views.view.tracker.yml b/core/modules/views/config/views.view.tracker.yml index 253259f..31d6f2c 100644 --- a/core/modules/views/config/views.view.tracker.yml +++ b/core/modules/views/config/views.view.tracker.yml @@ -1,4 +1,4 @@ -disabled: true +status: '0' module: node id: tracker description: 'Shows all new activity on the system.' 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..4235af3 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 @@ -34,7 +34,8 @@ * entity_keys = { * "id" = "id", * "label" = "human_name", - * "uuid" = "uuid" + * "uuid" = "uuid", + * "status" = "status" * } * ) */ @@ -103,16 +104,6 @@ class View extends ConfigEntityBase implements ViewStorageInterface { protected $base_field = 'nid'; /** - * Returns whether the view's status is disabled or not. - * - * This value is used for exported view, to provide some default views which - * aren't enabled. - * - * @var bool - */ - protected $disabled = FALSE; - - /** * The UUID for this entity. * * @var string @@ -151,6 +142,10 @@ public function get($property_name, $langcode = NULL) { public function uri() { return array( 'path' => 'admin/structure/views/view/' . $this->id(), + 'options' => array( + 'entity_type' => $this->entityType, + 'entity' => $this, + ), ); } @@ -164,29 +159,6 @@ public function createDuplicate() { } /** - * Implements Drupal\views\ViewStorageInterface::enable(). - */ - public function enable() { - $this->disabled = FALSE; - $this->save(); - } - - /** - * Implements Drupal\views\ViewStorageInterface::disable(). - */ - public function disable() { - $this->disabled = TRUE; - $this->save(); - } - - /** - * Implements Drupal\views\ViewStorageInterface::isEnabled(). - */ - public function isEnabled() { - return !$this->disabled; - } - - /** * Return the human readable name for a view. * * When a certain view doesn't have a human readable name return the machine readable name. @@ -364,7 +336,7 @@ public function getPaths() { foreach ($this->display as $display) { if (!empty($display['display_options']['path'])) { $path = $display['display_options']['path']; - if ($this->isEnabled() && strpos($path, '%') === FALSE) { + if ($this->status() && strpos($path, '%') === FALSE) { $all_paths[] = l('/' . $path, $path); } else { @@ -386,7 +358,7 @@ public function getExportProperties() { 'base_table', 'core', 'description', - 'disabled', + 'status', 'display', 'human_name', 'module', diff --git a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php index ade4e8c..37af0a2 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsBlock.php @@ -41,7 +41,7 @@ public function getDerivativeDefinitions(array $base_plugin_definition) { // Check all Views for block displays. foreach (views_get_all_views() as $view) { // Do not return results for disabled views. - if (!$view->isEnabled()) { + if (!$view->status()) { continue; } $executable = $view->get('executable'); diff --git a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php index e1ceb24..9ffa183 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Derivative/ViewsExposedFilterBlock.php @@ -41,7 +41,7 @@ public function getDerivativeDefinitions(array $base_plugin_definition) { // Check all Views for displays with an exposed filter block. foreach (views_get_all_views() as $view) { // Do not return results for disabled views. - if (!$view->isEnabled()) { + if (!$view->status()) { continue; } $executable = $view->get('executable'); diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php index 44dac15..4a0710b 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/AreaTest.php @@ -173,7 +173,10 @@ public function testTitleArea() { ), )); - $view->storage->enable(); + $view->storage->enable()->save(); + + // Force the rebuild of the menu. + menu_router_rebuild(); $this->drupalGet('frontpage'); $this->assertText('Overridden title', 'Overridden title found.'); diff --git a/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php b/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php index 5b9b6cd..85708c0 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php @@ -182,15 +182,15 @@ public function testLoadFunctions() { function testStatusFunctions() { $view = views_get_view('test_view_status')->storage; - $this->assertFalse($view->isEnabled(), 'The view status is disabled.'); + $this->assertFalse($view->status(), 'The view status is disabled.'); views_enable_view($view); - $this->assertTrue($view->isEnabled(), 'A view has been enabled.'); - $this->assertEqual($view->isEnabled(), views_view_is_enabled($view), 'views_view_is_enabled is correct.'); + $this->assertTrue($view->status(), 'A view has been enabled.'); + $this->assertEqual($view->status(), views_view_is_enabled($view), 'views_view_is_enabled is correct.'); views_disable_view($view); - $this->assertFalse($view->isEnabled(), 'A view has been disabled.'); - $this->assertEqual(!$view->isEnabled(), views_view_is_disabled($view), 'views_view_is_disabled is correct.'); + $this->assertFalse($view->status(), 'A view has been disabled.'); + $this->assertEqual(!$view->status(), views_view_is_disabled($view), 'views_view_is_disabled is correct.'); } /** diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php index ec36ae1..7d2143d 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php @@ -27,7 +27,7 @@ class ViewStorageTest extends ViewUnitTestBase { * @var array */ protected $config_properties = array( - 'disabled', + 'status', 'module', 'id', 'description', @@ -85,7 +85,6 @@ function testConfigurationEntityCRUD() { $this->loadTests(); $this->createTests(); $this->displayTests(); - $this->statusTests(); // Helper method tests $this->displayMethodTests(); @@ -102,7 +101,7 @@ protected function loadTests() { // expected properties. $this->assertTrue($view instanceof View, 'Single View instance loaded.'); foreach ($this->config_properties as $property) { - $this->assertTrue($view->get($property), format_string('Property: @property loaded onto View.', array('@property' => $property))); + $this->assertTrue($view->get($property) !== NULL, format_string('Property: @property loaded onto View.', array('@property' => $property))); } // Check the displays have been loaded correctly from config display data. @@ -152,7 +151,7 @@ protected function createTests() { // Test all properties except displays. foreach ($properties as $property) { - $this->assertTrue($created->get($property), format_string('Property: @property created on View.', array('@property' => $property))); + $this->assertTrue($created->get($property) !== NULL, format_string('Property: @property created on View.', array('@property' => $property))); $this->assertIdentical($values[$property], $created->get($property), format_string('Property value: @property matches configuration value.', array('@property' => $property))); } @@ -188,32 +187,6 @@ protected function displayTests() { } /** - * Tests statuses of configuration entities. - */ - protected function statusTests() { - // Test a View can be enabled and disabled again (with a new view). - $view = entity_load('view', 'test_view_storage_new_new2'); - - // The view should already be disabled. - $view->enable(); - $this->assertTrue($view->isEnabled(), 'A view has been enabled.'); - - // Check the saved values. - $view->save(); - $config = config('views.view.test_view_storage_new_new2')->get(); - $this->assertFalse($config['disabled'], 'The changed disabled property was saved.'); - - // Disable the view. - $view->disable(); - $this->assertFalse($view->isEnabled(), 'A view has been disabled.'); - - // Check the saved values. - $view->save(); - $config = config('views.view.test_view_storage_new_new2')->get(); - $this->assertTrue($config['disabled'], 'The changed disabled property was saved.'); - } - - /** * Tests the display related functions like getDisplaysList(). */ protected function displayMethodTests() { diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index 7447488..74e475a 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1485,7 +1485,7 @@ public function executeHookMenu($display_id = NULL, &$callbacks = array()) { */ public function access($displays = NULL, $account = NULL) { // Noone should have access to disabled views. - if (!$this->storage->isEnabled()) { + if (!$this->storage->status()) { return FALSE; } diff --git a/core/modules/views/lib/Drupal/views/ViewStorageInterface.php b/core/modules/views/lib/Drupal/views/ViewStorageInterface.php index 01bb87d..9bd3ba5 100644 --- a/core/modules/views/lib/Drupal/views/ViewStorageInterface.php +++ b/core/modules/views/lib/Drupal/views/ViewStorageInterface.php @@ -13,22 +13,4 @@ * Defines an interface for View storage classes. */ interface ViewStorageInterface extends \IteratorAggregate, ConfigEntityInterface { - - /** - * Sets the configuration entity status to enabled. - */ - public function enable(); - - /** - * Sets the configuration entity status to disabled. - */ - public function disable(); - - /** - * Returns whether the configuration entity is enabled. - * - * @return bool - */ - public function isEnabled(); - } diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml b/core/modules/views/tests/views_test_config/config/views.view.test_views_move_to_field.yml similarity index 56% copy from core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml copy to core/modules/views/tests/views_test_config/config/views.view.test_views_move_to_field.yml index b6275ce..fa2551e 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml +++ b/core/modules/views/tests/views_test_config/config/views.view.test_views_move_to_field.yml @@ -1,25 +1,19 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: - access: - type: none - cache: - type: none fields: - name: - id: name + old_field_1: + field: old_field_1 + id: old_field_1 table: views_test_data - field: name - style: - type: html_list display_plugin: default display_title: Master id: default position: '0' human_name: '' -id: test_field_output +id: test_views_move_to_field tag: '' diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml b/core/modules/views/tests/views_test_config/config/views.view.test_views_move_to_handler.yml similarity index 51% copy from core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml copy to core/modules/views/tests/views_test_config/config/views.view.test_views_move_to_handler.yml index b6275ce..9f5f5d8 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml +++ b/core/modules/views/tests/views_test_config/config/views.view.test_views_move_to_handler.yml @@ -1,25 +1,24 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: - access: - type: none - cache: - type: none fields: - name: - id: name + old_field_2: + field: old_field_2 + id: old_field_2 + table: views_test_data + filters: + old_field_3: + field: old_field_3 + id: old_field_3 table: views_test_data - field: name - style: - type: html_list display_plugin: default display_title: Master id: default position: '0' human_name: '' -id: test_field_output +id: test_views_move_to_handler tag: '' diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_access_dynamic.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_access_dynamic.yml index 2d75b3a..6886b90 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_access_dynamic.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_access_dynamic.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_access_none.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_access_none.yml index 8595c89..9e6d2bc 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_access_none.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_access_none.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_access_static.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_access_static.yml index 6c3410f..4ec1d04 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_access_static.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_access_static.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_aggregate_count.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_aggregate_count.yml index 95ebe54..243e45a 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_aggregate_count.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_aggregate_count.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_alias.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_alias.yml index e1e4478..2f0a9fc 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_alias.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_alias.yml @@ -1,7 +1,7 @@ base_table: users core: 8.0-dev description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_argument_default_current_user.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_argument_default_current_user.yml index 6ba4d7f..771e4e9 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_argument_default_current_user.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_argument_default_current_user.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_argument_default_fixed.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_argument_default_fixed.yml index ea0540c..2875a08 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_argument_default_fixed.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_argument_default_fixed.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_attachment_ui.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_attachment_ui.yml index d114623..ad57ddc 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_attachment_ui.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_attachment_ui.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_cache.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_cache.yml index 5177f9b..51219b1 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_cache.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_cache.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_click_sort.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_click_sort.yml index f212edc..89ca55a 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_click_sort.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_click_sort.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_destroy.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_destroy.yml index 800179f..58887ea 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_destroy.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_destroy.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '1' +status: '1' display: attachment_1: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_display.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_display.yml index b5c70f4..f1180c3 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_display.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_display.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '1' +status: '1' display: block_1: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_display_attachment.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_display_attachment.yml index b80669c..afdd633 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_display_attachment.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_display_attachment.yml @@ -2,7 +2,7 @@ base_field: id base_table: views_test_data core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_dropbutton.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_dropbutton.yml index b985e0b..93f1123 100755 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_dropbutton.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_dropbutton.yml @@ -2,7 +2,7 @@ base_field: nid base_table: node core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_example_area.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_example_area.yml index 39fcb4e..11259d2 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_example_area.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_example_area.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_executable_displays.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_executable_displays.yml index 18031d8..4a6b9ca 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_executable_displays.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_executable_displays.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_admin_ui.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_admin_ui.yml index 92b775f..72bc30e 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_admin_ui.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_admin_ui.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_form.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_form.yml index 6d6adb3..c272351 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_form.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_exposed_form.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_feed_display.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_feed_display.yml index bf58c2a..ce46690 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_feed_display.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_feed_display.yml @@ -1,7 +1,7 @@ base_table: node core: 8.0-dev description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_classes.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_classes.yml index a3a118f..7f6dc7d 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_classes.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_classes.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_get_entity.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_get_entity.yml index f39d416..ad41b54 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_get_entity.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_get_entity.yml @@ -1,7 +1,7 @@ base_table: comment core: 8.0-dev description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml index b6275ce..515f665 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_output.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_tokens.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_tokens.yml index 18afed9..915b5c3 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_tokens.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_tokens.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_type.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_type.yml index a031aab..6a82e88 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_field_type.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_field_type.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter.yml index aedaf23..735469f 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter.yml @@ -1,6 +1,6 @@ base_table: views_test_data core: 8 -disabled: false +status: true display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_date_between.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_date_between.yml index 9a2e16d..a954c9d 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_date_between.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_date_between.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_group_override.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_group_override.yml index a4de3cb..a67d586 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_group_override.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_group_override.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_groups.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_groups.yml index de084bc..63f6098 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_groups.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_groups.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_in_operator_ui.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_in_operator_ui.yml index 6cfe7e1..4a8377d 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_in_operator_ui.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_filter_in_operator_ui.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_get_attach_displays.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_get_attach_displays.yml index 89b6ce1..1aea360 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_get_attach_displays.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_get_attach_displays.yml @@ -98,6 +98,6 @@ display: default: default page_1: page_1 base_field: nid -disabled: '0' +status: '1' module: views langcode: und diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_glossary.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_glossary.yml index 71dbbc5..598d4cf 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_glossary.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_glossary.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_group_by_count.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_group_by_count.yml index 22e9a5d..a49fe31 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_group_by_count.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_group_by_count.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_group_by_in_filters.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_group_by_in_filters.yml index 446c6d8..5fff408 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_group_by_in_filters.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_group_by_in_filters.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_handler_relationships.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_handler_relationships.yml index b60fa39..d8ccf36 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_handler_relationships.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_handler_relationships.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_history.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_history.yml index ba96ad1..7a4f2d1 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_history.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_history.yml @@ -2,7 +2,7 @@ base_field: nid base_table: node core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_mini_pager.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_mini_pager.yml index 83c7a70..2fbe223 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_mini_pager.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_mini_pager.yml @@ -78,6 +78,6 @@ display: display_options: path: test_mini_pager base_field: nid -disabled: '0' +status: '1' module: views langcode: und diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_page_display.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_page_display.yml index 0027a58..3256666 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_page_display.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_page_display.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_full.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_full.yml index 5000688..64204ce 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_full.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_full.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_none.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_none.yml index 96b046e..c8a82f6 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_none.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_none.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_some.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_some.yml index 0c6bb7f..4f112ba 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_some.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_pager_some.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_preview.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_preview.yml index 0c2eb5f..bbb4412 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_preview.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_preview.yml @@ -2,7 +2,7 @@ base_field: id base_table: views_test_data core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_redirect_view.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_redirect_view.yml index 31cfe08..699c1b8 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_redirect_view.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_redirect_view.yml @@ -73,6 +73,6 @@ display: display_options: path: test-redirect-view base_field: nid -disabled: '0' +status: '1' module: views langcode: und diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_reset_button.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_reset_button.yml index e66e2fc..91cc282 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_reset_button.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_reset_button.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_simple_argument.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_simple_argument.yml index 0d1c3a5..493b868 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_simple_argument.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_simple_argument.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_store_pager_settings.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_store_pager_settings.yml index 1ec7885..43e6cfd 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_store_pager_settings.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_store_pager_settings.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_style_mapping.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_style_mapping.yml index a4339fc..ddc8694 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_style_mapping.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_style_mapping.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_tokens.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_tokens.yml index 58c8433..7801b90 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_tokens.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_tokens.yml @@ -52,5 +52,5 @@ display: options: { } path: test_tokens base_field: id -disabled: '0' +status: '1' module: views diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view.yml index 7200766..e3a3e7b 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_argument_validate_numeric.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_argument_validate_numeric.yml index 515aa6a..e523e51 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_argument_validate_numeric.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_argument_validate_numeric.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_argument_validate_php.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_argument_validate_php.yml index 3ec9cb2..18189b9 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_argument_validate_php.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_argument_validate_php.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_delete.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_delete.yml index 3b43da5..ca76fb2 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_delete.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_delete.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_handler_weight.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_handler_weight.yml index ebcfd0e..9676b56 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_handler_weight.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_handler_weight.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_pager_full_zero_items_per_page.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_pager_full_zero_items_per_page.yml index 105a3f8..f22503b 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_pager_full_zero_items_per_page.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_pager_full_zero_items_per_page.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_render.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_render.yml index c63da26..8020a88 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_render.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_render.yml @@ -1,7 +1,7 @@ base_table: views_test_data core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_status.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_status.yml index 886ce2c..0852d28 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_status.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_status.yml @@ -11,5 +11,5 @@ display: display_title: Master position: '' base_field: id -disabled: '1' +status: '0' module: views diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_storage.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_storage.yml index ab0c603..d53999c 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_view_storage.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_view_storage.yml @@ -2,7 +2,7 @@ base_table: views_test_data core: '8' module: views description: 'Storage Test View for testing.' -disabled: true +status: '0' display: default: display_options: diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_views_groupby_save.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_views_groupby_save.yml index 9db8ce8..e4984d5 100644 --- a/core/modules/views/tests/views_test_config/test_views/views.view.test_views_groupby_save.yml +++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_views_groupby_save.yml @@ -1,7 +1,7 @@ base_table: node core: '8' description: '' -disabled: '0' +status: '1' display: default: display_options: diff --git a/core/modules/views/views.module b/core/modules/views/views.module index dc565b8..9a49b2b 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -1094,7 +1094,7 @@ function views_get_applicable_views($type) { } $entity_ids = $container->get('entity.query')->get('view') - ->condition('disabled', FALSE) + ->condition('status', TRUE) ->condition("display.*.display_plugin", $ids, 'IN') ->execute(); @@ -1227,7 +1227,7 @@ function views_get_views_as_options($views_only = FALSE, $filter = 'all', $exclu * Returns TRUE if a view is enabled, FALSE otherwise. */ function views_view_is_enabled(View $view) { - return $view->isEnabled(); + return $view->status(); } /** @@ -1240,7 +1240,7 @@ function views_view_is_enabled(View $view) { * Returns TRUE if a view is disabled, FALSE otherwise. */ function views_view_is_disabled(View $view) { - return !$view->isEnabled(); + return !$view->status(); } /** diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php index 46c139b..3c25398 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewListController.php @@ -7,13 +7,13 @@ namespace Drupal\views_ui; -use Drupal\Core\Entity\EntityListController; use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Config\Entity\ConfigEntityListController; /** * Provides a listing of Views. */ -class ViewListController extends EntityListController { +class ViewListController extends ConfigEntityListController { /** * Overrides Drupal\Core\Entity\EntityListController::load(); @@ -24,7 +24,7 @@ public function load() { 'disabled' => array(), ); foreach (parent::load() as $entity) { - if ($entity->isEnabled()) { + if ($entity->status()) { $entities['enabled'][] = $entity; } else { @@ -49,7 +49,7 @@ public function buildRow(EntityInterface $view) { ), ), 'title' => t('Machine name: ') . $view->id(), - 'class' => array($view->isEnabled() ? 'views-ui-list-enabled' : 'views-ui-list-disabled'), + 'class' => array($view->status() ? 'views-ui-list-enabled' : 'views-ui-list-disabled'), ); } @@ -82,50 +82,14 @@ public function buildHeader() { } /** - * Implements Drupal\Core\Entity\EntityListController::getOperations(); + * Implements \Drupal\Core\Entity\EntityListController::getOperations(). */ public function getOperations(EntityInterface $view) { + $definition = parent::getOperations($view); + $uri = $view->uri(); $path = $uri['path']; - $definition['edit'] = array( - 'title' => t('Edit'), - 'href' => "$path/edit", - 'weight' => -5, - ); - if (!$view->isEnabled()) { - $definition['enable'] = array( - 'title' => t('Enable'), - 'ajax' => TRUE, - 'token' => TRUE, - 'href' => "$path/enable", - 'weight' => -10, - ); - } - else { - $definition['disable'] = array( - 'title' => t('Disable'), - 'ajax' => TRUE, - 'token' => TRUE, - 'href' => "$path/disable", - 'weight' => 0, - ); - } - // This property doesn't exist yet. - if (!empty($view->overridden)) { - $definition['revert'] = array( - 'title' => t('Revert'), - 'href' => "$path/revert", - 'weight' => 5, - ); - } - else { - $definition['delete'] = array( - 'title' => t('Delete'), - 'href' => "$path/delete", - 'weight' => 10, - ); - } $definition['clone'] = array( 'title' => t('Clone'), 'href' => "$path/clone", diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php index d161c97..e4b05f6 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php @@ -1047,23 +1047,23 @@ public function getProperties($include_computed = FALSE) { } /** - * Implements \Drupal\views\ViewStorageInterface::enable(). + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::enable(). */ public function enable() { return $this->__call(__FUNCTION__, func_get_args()); } /** - * Implements \Drupal\views\ViewStorageInterface::disable(). + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::disable(). */ public function disable() { return $this->__call(__FUNCTION__, func_get_args()); } /** - * Implements \Drupal\views\ViewStorageInterface::isEnabled(). + * Implements \Drupal\Core\Config\Entity\ConfigEntityInterface::status(). */ - public function isEnabled() { + public function status() { return $this->__call(__FUNCTION__, func_get_args()); } diff --git a/core/modules/views/views_ui/views_ui.module b/core/modules/views/views_ui/views_ui.module index 8ab01be..fda22c1 100644 --- a/core/modules/views/views_ui/views_ui.module +++ b/core/modules/views/views_ui/views_ui.module @@ -689,8 +689,9 @@ function views_ui_load($name) { * redirect back to the listing page. */ function views_ui_ajax_callback(ViewExecutable $view, $op) { - // Perform the operation. + // Perform the operation and save the view. $view->storage->$op(); + $view->save(); // If the request is via AJAX, return the rendered list as JSON. if (drupal_container()->get('request')->request->get('js')) {