diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 3bbf1ed..224056f 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -31,7 +31,7 @@ * * @var bool */ - public $status; + public $status = TRUE; /** * Overrides Entity::__construct(). diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php index 8df5847..a78dda9 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityInterface.php @@ -51,6 +51,15 @@ public function disable(); /** * Returns whether the configuration entity is enabled. * + * Status implementations for configuration entities should follow these + * general rules: + * - Status does not affect the loading of entities. I.e. Disabling + * configuration entities should only have UI/access implications. + * - It should only take effect when a 'status' key is explicitly declared + * in the entity_keys info of a configuration entitys annotation data. + * - Each entity implementation (entity/controller) is responsible for + * checking and managing the status. + * * @return bool */ public function 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 3c25398..7bb130e 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 @@ -86,16 +86,22 @@ public function buildHeader() { */ public function getOperations(EntityInterface $view) { $definition = parent::getOperations($view); - $uri = $view->uri(); - $path = $uri['path']; $definition['clone'] = array( 'title' => t('Clone'), - 'href' => "$path/clone", + 'href' => $uri['path'] . '/clone', + 'options' => $uri['options'], 'weight' => 15, ); + // Add AJAX functionality to enable/disable operations. + foreach (array('enable', 'disable') as $op) { + if (isset($definition[$op])) { + $definition[$op]['ajax'] = TRUE; + } + } + return $definition; }