diff --git a/core/includes/common.inc b/core/includes/common.inc index c9913a2..f6870aa 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -2099,9 +2099,9 @@ function _format_date_callback(array $matches = NULL, $new_langcode = NULL) { * Defaults to empty string when clean URLs are in effect, and to * 'index.php/' when they are not. * - 'entity_type': The entity type of the object that called url(). Only - * set if url() is invoked by Drupal\entity\Entity::uri(). + * set if url() is invoked by Drupal\Core\Entity\Entity::uri(). * - 'entity': The entity object (such as a node) for which the URL is being - * generated. Only set if url() is invoked by Drupal\entity\Entity::uri(). + * generated. Only set if url() is invoked by Drupal\Core\Entity\Entity::uri(). * * @return * A string containing a URL to the given path. @@ -4868,6 +4868,7 @@ function _drupal_bootstrap_code() { require_once DRUPAL_ROOT . '/core/includes/token.inc'; require_once DRUPAL_ROOT . '/core/includes/errors.inc'; require_once DRUPAL_ROOT . '/core/includes/schema.inc'; + require_once DRUPAL_ROOT . '/core/includes/entity.inc'; // Load all enabled modules module_load_all(); diff --git a/core/modules/entity/entity.api.php b/core/includes/entity.api.php similarity index 90% rename from core/modules/entity/entity.api.php rename to core/includes/entity.api.php index 11e99d1..5afd67c 100644 --- a/core/modules/entity/entity.api.php +++ b/core/includes/entity.api.php @@ -22,11 +22,11 @@ * properties of those types that the system needs to know about: * - label: The human-readable name of the type. * - entity class: The name of the entity class, defaults to - * Drupal\entity\Entity. The entity class must implement EntityInterface. + * Drupal\Core\Entity\Entity. The entity class must implement EntityInterface. * - controller class: The name of the class that is used to load the objects. * The class has to implement the - * Drupal\entity\EntityStorageControllerInterface interface. Leave blank - * to use the Drupal\entity\DatabaseStorageController implementation. + * Drupal\Core\Entity\EntityStorageControllerInterface interface. Leave blank + * to use the Drupal\Core\Entity\DatabaseStorageController implementation. * - form controller class: An associative array where the keys are the names * of the different form operations (such as creation, editing or deletion) * and the values are the names of the controller classes. To facilitate @@ -34,9 +34,9 @@ * different operations, the name of the operation is passed also to the * constructor of the form controller class. This way, one class can be used * for multiple entity forms. - * - base table: (used by Drupal\entity\DatabaseStorageController) The + * - base table: (used by Drupal\Core\Entity\DatabaseStorageController) The * name of the entity type's base table. - * - static cache: (used by Drupal\entity\DatabaseStorageController) + * - static cache: (used by Drupal\Core\Entity\DatabaseStorageController) * FALSE to disable static caching of entities during a page request. * Defaults to TRUE. * - field cache: (used by Field API loading and saving of field data) FALSE @@ -57,7 +57,7 @@ * (see below). If more complex logic is needed to determine the label of * an entity, you can instead specify a callback function here, which will * be called to determine the entity label. See also the - * Drupal\entity\Entity::label() method, which implements this logic. + * Drupal\Core\Entity\Entity::label() method, which implements this logic. * - fieldable: Set to TRUE if you want your entity type to be fieldable. * - translation: An associative array of modules registered as field * translation handlers. Array keys are the module names, array values @@ -229,7 +229,7 @@ function hook_entity_info() { */ function hook_entity_info_alter(&$entity_info) { // Set the controller class for nodes to an alternate implementation of the - // Drupal\entity\EntityStorageControllerInterface interface. + // Drupal\Core\Entity\EntityStorageControllerInterface interface. $entity_info['node']['controller class'] = 'Drupal\mymodule\MyCustomNodeStorageController'; } @@ -253,20 +253,20 @@ function hook_entity_load($entities, $entity_type) { /** * Act on an entity before it is about to be created or updated. * - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity object. */ -function hook_entity_presave(Drupal\entity\EntityInterface $entity) { +function hook_entity_presave(Drupal\Core\Entity\EntityInterface $entity) { $entity->changed = REQUEST_TIME; } /** * Act on entities when inserted. * - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity object. */ -function hook_entity_insert(Drupal\entity\EntityInterface $entity) { +function hook_entity_insert(Drupal\Core\Entity\EntityInterface $entity) { // Insert the new entity into a fictional table of all entities. db_insert('example_entity') ->fields(array( @@ -281,10 +281,10 @@ function hook_entity_insert(Drupal\entity\EntityInterface $entity) { /** * Act on entities when updated. * - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity object. */ -function hook_entity_update(Drupal\entity\EntityInterface $entity) { +function hook_entity_update(Drupal\Core\Entity\EntityInterface $entity) { // Update the entity's entry in a fictional table of all entities. db_update('example_entity') ->fields(array( @@ -300,10 +300,10 @@ function hook_entity_update(Drupal\entity\EntityInterface $entity) { * * This hook runs after the entity type-specific predelete hook. * - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity object for the entity that is about to be deleted. */ -function hook_entity_predelete(Drupal\entity\EntityInterface $entity) { +function hook_entity_predelete(Drupal\Core\Entity\EntityInterface $entity) { // Count references to this entity in a custom table before they are removed // upon entity deletion. $id = $entity->id(); @@ -329,10 +329,10 @@ function hook_entity_predelete(Drupal\entity\EntityInterface $entity) { * * This hook runs after the entity type-specific delete hook. * - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity object for the entity that has been deleted. */ -function hook_entity_delete(Drupal\entity\EntityInterface $entity) { +function hook_entity_delete(Drupal\Core\Entity\EntityInterface $entity) { // Delete the entity's entry from a fictional table of all entities. db_delete('example_entity') ->condition('type', $entity->entityType()) @@ -341,9 +341,9 @@ function hook_entity_delete(Drupal\entity\EntityInterface $entity) { } /** - * Alter or execute an Drupal\entity\EntityFieldQuery. + * Alter or execute an Drupal\Core\Entity\EntityFieldQuery. * - * @param Drupal\entity\EntityFieldQuery $query + * @param Drupal\Core\Entity\EntityFieldQuery $query * An EntityFieldQuery. One of the most important properties to be changed is * EntityFieldQuery::executeCallback. If this is set to an existing function, * this function will get the query as its single argument and its result @@ -362,14 +362,14 @@ function hook_entity_delete(Drupal\entity\EntityInterface $entity) { * ($query->pager && $query->count), allowing the driver to return 0 from * the count query and disable the pager. */ -function hook_entity_query_alter(Drupal\entity\EntityFieldQuery $query) { +function hook_entity_query_alter(Drupal\Core\Entity\EntityFieldQuery $query) { $query->executeCallback = 'my_module_query_callback'; } /** * Act on entities being assembled before rendering. * - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity object. * @param $view_mode * The view mode the entity is rendered in. @@ -385,7 +385,7 @@ function hook_entity_query_alter(Drupal\entity\EntityFieldQuery $query) { * @see hook_node_view() * @see hook_user_view() */ -function hook_entity_view(Drupal\entity\EntityInterface $entity, $view_mode, $langcode) { +function hook_entity_view(Drupal\Core\Entity\EntityInterface $entity, $view_mode, $langcode) { $entity->content['my_additional_field'] = array( '#markup' => $additional_field, '#weight' => 10, @@ -408,7 +408,7 @@ function hook_entity_view(Drupal\entity\EntityInterface $entity, $view_mode, $la * * @param $build * A renderable array representing the entity content. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity object being rendered. * * @see hook_entity_view() @@ -417,7 +417,7 @@ function hook_entity_view(Drupal\entity\EntityInterface $entity, $view_mode, $la * @see hook_taxonomy_term_view_alter() * @see hook_user_view_alter() */ -function hook_entity_view_alter(&$build, Drupal\entity\EntityInterface $entity) { +function hook_entity_view_alter(&$build, Drupal\Core\Entity\EntityInterface $entity) { if ($build['#view_mode'] == 'full' && isset($build['an_additional_field'])) { // Change its weight. $build['an_additional_field']['#weight'] = -10; @@ -454,13 +454,13 @@ function hook_entity_prepare_view($entities, $entity_type) { * * @param string $view_mode * The view_mode that is to be used to display the entity. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity that is being viewed. * @param array $context * Array with additional context information, currently only contains the * langcode the entity is viewed in. */ -function hook_entity_view_mode_alter(&$view_mode, Drupal\entity\EntityInterface $entity, $context) { +function hook_entity_view_mode_alter(&$view_mode, Drupal\Core\Entity\EntityInterface $entity, $context) { // For nodes, change the view mode when it is teaser. if ($entity->entityType() == 'node' && $view_mode == 'teaser') { $view_mode = 'my_custom_view_mode'; diff --git a/core/modules/entity/entity.module b/core/includes/entity.inc similarity index 87% rename from core/modules/entity/entity.module rename to core/includes/entity.inc index 8bd2fc1..b651e32 100644 --- a/core/modules/entity/entity.module +++ b/core/includes/entity.inc @@ -6,37 +6,10 @@ */ use \InvalidArgumentException; -use Drupal\entity\EntityFieldQuery; -use Drupal\entity\EntityMalformedException; -use Drupal\entity\EntityStorageException; -use Drupal\entity\EntityInterface; - -/** - * Implements hook_help(). - */ -function entity_help($path, $arg) { - switch ($path) { - case 'admin/help#entity': - $output = ''; - $output .= '

' . t('About') . '

'; - $output .= '

' . t('The Entity module provides an API for managing entities like nodes and users, i.e. an API for loading and identifying entities. For more information, see the online handbook entry for Entity module', array('!url' => 'http://drupal.org/documentation/modules/entity')) . '

'; - return $output; - } -} - -/** - * Implements hook_modules_preenable(). - */ -function entity_modules_preenable() { - entity_info_cache_clear(); -} - -/** - * Implements hook_modules_disabled(). - */ -function entity_modules_disabled() { - entity_info_cache_clear(); -} +use Drupal\Core\Entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityMalformedException; +use Drupal\Core\Entity\EntityStorageException; +use Drupal\Core\Entity\EntityInterface; /** * Gets the entity info array of an entity type. @@ -72,10 +45,10 @@ function entity_get_info($entity_type = NULL) { foreach ($entity_info as $name => $data) { $entity_info[$name] += array( 'fieldable' => FALSE, - 'entity class' => 'Drupal\entity\Entity', - 'controller class' => 'Drupal\entity\DatabaseStorageController', + 'entity class' => 'Drupal\Core\Entity\Entity', + 'controller class' => 'Drupal\Core\Entity\DatabaseStorageController', 'form controller class' => array( - 'default' => 'Drupal\entity\EntityFormController', + 'default' => 'Drupal\Core\Entity\EntityFormController', ), 'static cache' => TRUE, 'field cache' => TRUE, @@ -99,7 +72,7 @@ function entity_get_info($entity_type = NULL) { $entity_info[$name]['bundles'] = array($name => array('label' => $entity_info[$name]['label'])); } // Prepare entity schema fields SQL info for - // Drupal\entity\DatabaseStorageControllerInterface::buildQuery(). + // Drupal\Core\Entity\DatabaseStorageControllerInterface::buildQuery(). if (isset($entity_info[$name]['base table'])) { $entity_info[$name]['schema_fields_sql']['base table'] = drupal_schema_fields_sql($entity_info[$name]['base table']); if (isset($entity_info[$name]['revision table'])) { @@ -140,14 +113,14 @@ function entity_info_cache_clear() { * @param bool $reset * Whether to reset the internal cache for the requested entity type. * - * @return Drupal\entity\EntityInterface + * @return Drupal\Core\Entity\EntityInterface * The entity object, or FALSE if there is no entity with the given id. * * @see hook_entity_info() * @see entity_load_multiple() - * @see Drupal\entity\EntityStorageControllerInterface - * @see Drupal\entity\DatabaseStorageController - * @see Drupal\entity\EntityFieldQuery + * @see Drupal\Core\Entity\EntityStorageControllerInterface + * @see Drupal\Core\Entity\DatabaseStorageController + * @see Drupal\Core\Entity\EntityFieldQuery */ function entity_load($entity_type, $id, $reset = FALSE) { $entities = entity_load_multiple($entity_type, array($id), $reset); @@ -162,13 +135,13 @@ function entity_load($entity_type, $id, $reset = FALSE) { * @param int $revision_id * The id of the entity to load. * - * @return Drupal\entity\EntityInterface + * @return Drupal\Core\Entity\EntityInterface * The entity object, or FALSE if there is no entity with the given revision * id. * * @see hook_entity_info() - * @see Drupal\entity\EntityStorageControllerInterface - * @see Drupal\entity\DatabaseStorageController + * @see Drupal\Core\Entity\EntityStorageControllerInterface + * @see Drupal\Core\Entity\DatabaseStorageController */ function entity_revision_load($entity_type, $revision_id) { return entity_get_controller($entity_type)->loadRevision($revision_id); @@ -189,7 +162,7 @@ function entity_revision_load($entity_type, $revision_id) { * @return EntityInterface|FALSE * The entity object, or FALSE if there is no entity with the given UUID. * - * @throws Drupal\entity\EntityStorageException + * @throws Drupal\Core\Entity\EntityStorageException * Thrown in case the requested entity type does not support UUIDs. * * @see hook_entity_info() @@ -217,12 +190,12 @@ function entity_load_by_uuid($entity_type, $uuid, $reset = FALSE) { * database access if loaded again during the same page request. * * The actual loading is done through a class that has to implement the - * Drupal\entity\EntityStorageControllerInterface interface. By default, - * Drupal\entity\DatabaseStorageController is used. Entity types can + * Drupal\Core\Entity\EntityStorageControllerInterface interface. By default, + * Drupal\Core\Entity\DatabaseStorageController is used. Entity types can * specify that a different class should be used by setting the * 'controller class' key in hook_entity_info(). These classes can either - * implement the Drupal\entity\EntityStorageControllerInterface interface, or, - * most commonly, extend the Drupal\entity\DatabaseStorageController + * implement the Drupal\Core\Entity\EntityStorageControllerInterface interface, or, + * most commonly, extend the Drupal\Core\Entity\DatabaseStorageController * class. See node_entity_info() and the NodeStorageController in node.module as * an example. * @@ -237,9 +210,9 @@ function entity_load_by_uuid($entity_type, $uuid, $reset = FALSE) { * An array of entity objects indexed by their ids. * * @see hook_entity_info() - * @see Drupal\entity\EntityStorageControllerInterface - * @see Drupal\entity\DatabaseStorageController - * @see Drupal\entity\EntityFieldQuery + * @see Drupal\Core\Entity\EntityStorageControllerInterface + * @see Drupal\Core\Entity\DatabaseStorageController + * @see Drupal\Core\Entity\EntityFieldQuery */ function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) { if ($reset) { @@ -307,7 +280,7 @@ function entity_delete_multiple($entity_type, $ids) { * An array of values to set, keyed by property name. If the entity type has * bundles the bundle key has to be specified. * - * @return Drupal\entity\EntityInterface + * @return Drupal\Core\Entity\EntityInterface * A new entity object. */ function entity_create($entity_type, array $values) { @@ -317,7 +290,7 @@ function entity_create($entity_type, array $values) { /** * Gets the entity controller class for an entity type. * - * @return Drupal\entity\EntityStorageControllerInterface + * @return Drupal\Core\Entity\EntityStorageControllerInterface */ function entity_get_controller($entity_type) { $controllers = &drupal_static(__FUNCTION__, array()); @@ -373,10 +346,10 @@ function entity_prepare_view($entity_type, $entities) { /** * Returns the label of an entity. * - * This is a wrapper for Drupal\entity\EntityInterface::label(). This function + * This is a wrapper for Drupal\Core\Entity\EntityInterface::label(). This function * should only be used as a callback, e.g. for menu title callbacks. * - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity for which to generate the label. * @param $langcode * (optional) The language code of the language that should be used for @@ -386,7 +359,7 @@ function entity_prepare_view($entity_type, $entities) { * @return * The label of the entity, or NULL if there is no label defined. * - * @see Drupal\entity\EntityInterface::label() + * @see Drupal\Core\Entity\EntityInterface::label() */ function entity_page_label(EntityInterface $entity, $langcode = NULL) { return $entity->label($langcode); @@ -410,7 +383,7 @@ function entity_page_label(EntityInterface $entity, $langcode = NULL) { * identifying the controlled form. Defaults to 'default' which is the usual * create/edit form. * - * @return Drupal\entity\EntityFormControllerInterface + * @return Drupal\Core\Entity\EntityFormControllerInterface * An entity form controller instance. */ function entity_form_controller($entity_type, $operation = 'default') { @@ -422,7 +395,7 @@ function entity_form_controller($entity_type, $operation = 'default') { } // If no controller is specified default to the base implementation. elseif (empty($info['form controller class']) && $operation == 'default') { - $class = 'Drupal\entity\EntityFormController'; + $class = 'Drupal\Core\Entity\EntityFormController'; } // If a non-existing operation has been specified stop. else { diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc index 3b69ce3..506b7c8 100644 --- a/core/includes/install.core.inc +++ b/core/includes/install.core.inc @@ -273,6 +273,7 @@ function install_begin_request(&$install_state) { // Load module basics (needed for hook invokes). include_once DRUPAL_ROOT . '/core/includes/module.inc'; include_once DRUPAL_ROOT . '/core/includes/session.inc'; + require_once DRUPAL_ROOT . '/core/includes/entity.inc'; // Determine whether the configuration system is ready to operate. $install_state['config_verified'] = install_verify_config_directory(CONFIG_ACTIVE_DIRECTORY) && install_verify_config_directory(CONFIG_STAGING_DIRECTORY); @@ -320,11 +321,9 @@ function install_begin_request(&$install_state) { require_once DRUPAL_ROOT . '/core/includes/ajax.inc'; // Override the module list with a minimal set of modules. $module_list['system']['filename'] = 'core/modules/system/system.module'; - $module_list['entity']['filename'] = 'core/modules/entity/entity.module'; $module_list['user']['filename'] = 'core/modules/user/user.module'; module_list(NULL, $module_list); drupal_load('module', 'system'); - drupal_load('module', 'entity'); drupal_load('module', 'user'); // Load the cache infrastructure using a "fake" cache implementation that diff --git a/core/includes/module.inc b/core/includes/module.inc index cbdbeaf..5a30875 100644 --- a/core/includes/module.inc +++ b/core/includes/module.inc @@ -476,6 +476,7 @@ function module_enable($module_list, $enable_dependencies = TRUE) { } // Allow modules to react prior to the enabling of a module. + entity_info_cache_clear(); module_invoke_all('modules_preenable', array($module)); // Enable the module. @@ -560,6 +561,7 @@ function module_disable($module_list, $disable_dependents = TRUE) { // Refresh the module list to exclude the disabled modules. system_list_reset(); module_implements_reset(); + entity_info_cache_clear(); // Invoke hook_modules_disabled before disabling modules, // so we can still call module hooks to get information. module_invoke_all('modules_disabled', $invoke_modules); diff --git a/core/modules/entity/lib/Drupal/entity/ContentEntityInterface.php b/core/lib/Drupal/Core/Entity/ContentEntityInterface.php similarity index 63% rename from core/modules/entity/lib/Drupal/entity/ContentEntityInterface.php rename to core/lib/Drupal/Core/Entity/ContentEntityInterface.php index dfafdca..33ecdae 100644 --- a/core/modules/entity/lib/Drupal/entity/ContentEntityInterface.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityInterface.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\ContentEntityInterface. + * Definition of Drupal\Core\Entity\ContentEntityInterface. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; /** * Defines a common interface for all content entity objects. diff --git a/core/modules/entity/lib/Drupal/entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php similarity index 93% rename from core/modules/entity/lib/Drupal/entity/DatabaseStorageController.php rename to core/lib/Drupal/Core/Entity/DatabaseStorageController.php index 6ea7ffb..db3d793 100644 --- a/core/modules/entity/lib/Drupal/entity/DatabaseStorageController.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\DatabaseStorageController. + * Definition of Drupal\Core\Entity\DatabaseStorageController. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; use PDO; use Exception; @@ -15,7 +15,7 @@ /** * Defines a base entity controller class. * - * Default implementation of Drupal\entity\EntityStorageControllerInterface. + * Default implementation of Drupal\Core\Entity\EntityStorageControllerInterface. * * This class can be used as-is by most simple entity types. Entity types * requiring special handling can extend the class. @@ -48,7 +48,7 @@ class DatabaseStorageController implements EntityStorageControllerInterface { /** * Additional arguments to pass to hook_TYPE_load(). * - * Set before calling Drupal\entity\DatabaseStorageController::attachLoad(). + * Set before calling Drupal\Core\Entity\DatabaseStorageController::attachLoad(). * * @var array */ @@ -96,7 +96,7 @@ class DatabaseStorageController implements EntityStorageControllerInterface { protected $cache; /** - * Implements Drupal\entity\EntityStorageControllerInterface::__construct(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::__construct(). * * Sets basic variables. */ @@ -129,7 +129,7 @@ public function __construct($entityType) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::resetCache(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::resetCache(). */ public function resetCache(array $ids = NULL) { if (isset($ids)) { @@ -143,7 +143,7 @@ public function resetCache(array $ids = NULL) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::load(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::load(). */ public function load(array $ids = NULL) { $entities = array(); @@ -174,7 +174,7 @@ public function load(array $ids = NULL) { if (!empty($this->entityInfo['entity class'])) { // We provide the necessary arguments for PDO to create objects of the // specified entity class. - // @see Drupal\entity\EntityInterface::__construct() + // @see Drupal\Core\Entity\EntityInterface::__construct() $query_result->setFetchMode(PDO::FETCH_CLASS, $this->entityInfo['entity class'], array(array(), $this->entityType)); } $queried_entities = $query_result->fetchAllAssoc($this->idKey); @@ -210,7 +210,7 @@ public function load(array $ids = NULL) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::loadRevision(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadRevision(). */ public function loadRevision($revision_id) { // Build and execute the query. @@ -219,7 +219,7 @@ public function loadRevision($revision_id) { if (!empty($this->entityInfo['entity class'])) { // We provide the necessary arguments for PDO to create objects of the // specified entity class. - // @see Drupal\entity\EntityInterface::__construct() + // @see Drupal\Core\Entity\EntityInterface::__construct() $query_result->setFetchMode(PDO::FETCH_CLASS, $this->entityInfo['entity class'], array(array(), $this->entityType)); } $queried_entities = $query_result->fetchAllAssoc($this->idKey); @@ -234,7 +234,7 @@ public function loadRevision($revision_id) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::loadByProperties(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadByProperties(). */ public function loadByProperties(array $values = array()) { // Build a query to fetch the entity IDs. @@ -253,7 +253,7 @@ public function loadByProperties(array $values = array()) { /** * Builds an entity query. * - * @param Drupal\entity\EntityFieldQuery $entity_query + * @param Drupal\Core\Entity\EntityFieldQuery $entity_query * EntityFieldQuery instance. * @param array $values * An associative array of properties of the entity, where the keys are the @@ -400,10 +400,10 @@ protected function cacheSet($entities) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::create(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::create(). */ public function create(array $values) { - $class = isset($this->entityInfo['entity class']) ? $this->entityInfo['entity class'] : 'Drupal\entity\Entity'; + $class = isset($this->entityInfo['entity class']) ? $this->entityInfo['entity class'] : 'Drupal\Core\Entity\Entity'; $entity = new $class($values, $this->entityType); @@ -417,7 +417,7 @@ public function create(array $values) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::delete(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::delete(). */ public function delete($ids) { $entities = $ids ? $this->load($ids) : FALSE; @@ -455,7 +455,7 @@ public function delete($ids) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::save(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::save(). */ public function save(EntityInterface $entity) { $transaction = db_transaction(); diff --git a/core/modules/entity/lib/Drupal/entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php similarity index 97% rename from core/modules/entity/lib/Drupal/entity/Entity.php rename to core/lib/Drupal/Core/Entity/Entity.php index 7e5d175..1d22278 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\Entity. + * Definition of Drupal\Core\Entity\Entity. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; use Drupal\Component\Uuid\Uuid; use Drupal\Core\Language\Language; @@ -270,14 +270,14 @@ public function entityInfo() { } /** - * Implements Drupal\entity\EntityInterface::getRevisionId(). + * Implements Drupal\Core\Entity\EntityInterface::getRevisionId(). */ public function getRevisionId() { return NULL; } /** - * Implements Drupal\entity\EntityInterface::isDefaultRevision(). + * Implements Drupal\Core\Entity\EntityInterface::isDefaultRevision(). */ public function isDefaultRevision($new_value = NULL) { $return = $this->isDefaultRevision; diff --git a/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php b/core/lib/Drupal/Core/Entity/EntityFieldQuery.php similarity index 93% rename from core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php rename to core/lib/Drupal/Core/Entity/EntityFieldQuery.php index fc283fc..979cb2f 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityFieldQuery.php +++ b/core/lib/Drupal/Core/Entity/EntityFieldQuery.php @@ -2,12 +2,12 @@ /** * @file - * Definition of Drupal\entity\EntityFieldQuery. + * Definition of Drupal\Core\Entity\EntityFieldQuery. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; -use Drupal\entity\EntityFieldQueryException; +use Drupal\Core\Entity\EntityFieldQueryException; use Drupal\Core\Database\Query\Select; use Drupal\Core\Database\Query\PagerSelectExtender; @@ -44,7 +44,7 @@ class EntityFieldQuery { /** * Indicates that both deleted and non-deleted fields should be returned. * - * @see Drupal\entity\EntityFieldQuery::deleted() + * @see Drupal\Core\Entity\EntityFieldQuery::deleted() */ const RETURN_ALL = NULL; @@ -63,7 +63,7 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::entityCondition() + * @see Drupal\Core\Entity\EntityFieldQuery::entityCondition() */ public $entityConditions = array(); @@ -72,7 +72,7 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::fieldCondition() + * @see Drupal\Core\Entity\EntityFieldQuery::fieldCondition() */ public $fieldConditions = array(); @@ -86,8 +86,8 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::fieldLanguageCondition() - * @see Drupal\entity\EntityFieldQuery::fieldDeltaCondition() + * @see Drupal\Core\Entity\EntityFieldQuery::fieldLanguageCondition() + * @see Drupal\Core\Entity\EntityFieldQuery::fieldDeltaCondition() */ public $fieldMetaConditions = array(); @@ -96,7 +96,7 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::propertyCondition() + * @see Drupal\Core\Entity\EntityFieldQuery::propertyCondition() */ public $propertyConditions = array(); @@ -112,7 +112,7 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::range() + * @see Drupal\Core\Entity\EntityFieldQuery::range() */ public $range = array(); @@ -121,7 +121,7 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::pager() + * @see Drupal\Core\Entity\EntityFieldQuery::pager() */ public $pager = array(); @@ -131,7 +131,7 @@ class EntityFieldQuery { * TRUE to return only deleted data, FALSE to return only non-deleted data, * EntityFieldQuery::RETURN_ALL to return everything. * - * @see Drupal\entity\EntityFieldQuery::deleted() + * @see Drupal\Core\Entity\EntityFieldQuery::deleted() */ public $deleted = FALSE; @@ -159,7 +159,7 @@ class EntityFieldQuery { * * @var int * - * @see Drupal\entity\EntityFieldQuery::age() + * @see Drupal\Core\Entity\EntityFieldQuery::age() */ public $age = FIELD_LOAD_CURRENT; @@ -168,7 +168,7 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::addTag() + * @see Drupal\Core\Entity\EntityFieldQuery::addTag() */ public $tags = array(); @@ -177,7 +177,7 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::addMetaData() + * @see Drupal\Core\Entity\EntityFieldQuery::addMetaData() */ public $metaData = array(); @@ -186,7 +186,7 @@ class EntityFieldQuery { * * @var array * - * @see Drupal\entity\EntityFieldQuery::execute(). + * @see Drupal\Core\Entity\EntityFieldQuery::execute(). */ public $orderedResults = array(); @@ -195,7 +195,7 @@ class EntityFieldQuery { * * @var string * - * @see Drupal\entity\EntityFieldQuery::execute() + * @see Drupal\Core\Entity\EntityFieldQuery::execute() */ public $executeCallback = ''; @@ -233,7 +233,7 @@ class EntityFieldQuery { * The operator can be omitted, and will default to 'IN' if the value is an * array, or to '=' otherwise. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function entityCondition($name, $value, $operator = NULL) { @@ -265,11 +265,11 @@ public function entityCondition($name, $value, $operator = NULL) { * An arbitrary identifier: conditions in the same group must have the same * $langcode_group. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. * - * @see Drupal\entity\EntityFieldQuery::addFieldCondition() - * @see Drupal\entity\EntityFieldQuery::deleted() + * @see Drupal\Core\Entity\EntityFieldQuery::addFieldCondition() + * @see Drupal\Core\Entity\EntityFieldQuery::deleted() */ public function fieldCondition($field, $column = NULL, $value = NULL, $operator = NULL, $delta_group = NULL, $langcode_group = NULL) { return $this->addFieldCondition($this->fieldConditions, $field, $column, $value, $operator, $delta_group, $langcode_group); @@ -291,11 +291,11 @@ public function fieldCondition($field, $column = NULL, $value = NULL, $operator * An arbitrary identifier: conditions in the same group must have the same * $langcode_group. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. * - * @see Drupal\entity\EntityFieldQuery::addFieldCondition() - * @see Drupal\entity\EntityFieldQuery::deleted() + * @see Drupal\Core\Entity\EntityFieldQuery::addFieldCondition() + * @see Drupal\Core\Entity\EntityFieldQuery::deleted() */ public function fieldLanguageCondition($field, $value = NULL, $operator = NULL, $delta_group = NULL, $langcode_group = NULL) { return $this->addFieldCondition($this->fieldMetaConditions, $field, 'langcode', $value, $operator, $delta_group, $langcode_group); @@ -317,11 +317,11 @@ public function fieldLanguageCondition($field, $value = NULL, $operator = NULL, * An arbitrary identifier: conditions in the same group must have the same * $langcode_group. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. * - * @see Drupal\entity\EntityFieldQuery::addFieldCondition() - * @see Drupal\entity\EntityFieldQuery::deleted() + * @see Drupal\Core\Entity\EntityFieldQuery::addFieldCondition() + * @see Drupal\Core\Entity\EntityFieldQuery::deleted() */ public function fieldDeltaCondition($field, $value = NULL, $operator = NULL, $delta_group = NULL, $langcode_group = NULL) { return $this->addFieldCondition($this->fieldMetaConditions, $field, 'delta', $value, $operator, $delta_group, $langcode_group); @@ -367,7 +367,7 @@ public function fieldDeltaCondition($field, $value = NULL, $operator = NULL, $de * An arbitrary identifier: conditions in the same group must have the same * $langcode_group. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ protected function addFieldCondition(&$conditions, $field, $column = NULL, $value = NULL, $operator = NULL, $delta_group = NULL, $langcode_group = NULL) { @@ -421,7 +421,7 @@ protected function addFieldCondition(&$conditions, $field, $column = NULL, $valu * The operator can be omitted, and will default to 'IN' if the value is an * array, or to '=' otherwise. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function propertyCondition($column, $value, $operator = NULL) { @@ -447,7 +447,7 @@ public function propertyCondition($column, $value, $operator = NULL) { * @param $direction * The direction to sort. Legal values are "ASC" and "DESC". * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function entityOrderBy($name, $direction = 'ASC') { @@ -475,7 +475,7 @@ public function entityOrderBy($name, $direction = 'ASC') { * @param $direction * The direction to sort. Legal values are "ASC" and "DESC". * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function fieldOrderBy($field, $column, $direction = 'ASC') { @@ -516,7 +516,7 @@ public function fieldOrderBy($field, $column, $direction = 'ASC') { * @param $direction * The direction to sort. Legal values are "ASC" and "DESC". * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function propertyOrderBy($column, $direction = 'ASC') { @@ -531,7 +531,7 @@ public function propertyOrderBy($column, $direction = 'ASC') { /** * Sets the query to be a count query only. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function count() { @@ -548,7 +548,7 @@ public function count() { * @param $length * The number of entities to return from the result set. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function range($start = NULL, $length = NULL) { @@ -569,7 +569,7 @@ public function range($start = NULL, $length = NULL) { * An optional integer to distinguish between multiple pagers on one page. * If not provided, one is automatically calculated. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function pager($limit = 10, $element = NULL) { @@ -594,7 +594,7 @@ public function pager($limit = 10, $element = NULL) { * An EFQ Header array based on which the order clause is added to the * query. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function tableSort(&$headers) { @@ -629,7 +629,7 @@ public function tableSort(&$headers) { * TRUE to only return deleted data, FALSE to return non-deleted data, * EntityFieldQuery::RETURN_ALL to return everything. Defaults to FALSE. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function deleted($deleted = TRUE) { @@ -650,7 +650,7 @@ public function deleted($deleted = TRUE) { * - FIELD_LOAD_REVISION: Query all revisions. The results will be keyed by * entity type and entity revision ID. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function age($age) { @@ -675,7 +675,7 @@ public function age($age) { * @param string $tag * The tag to add. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function addTag($tag) { @@ -696,7 +696,7 @@ public function addTag($tag) { * @param $object * The additional data to add to the query. May be any valid PHP variable. * - * @return Drupal\entity\EntityFieldQuery + * @return Drupal\Core\Entity\EntityFieldQuery * The called object. */ public function addMetaData($key, $object) { diff --git a/core/modules/entity/lib/Drupal/entity/EntityFieldQueryException.php b/core/lib/Drupal/Core/Entity/EntityFieldQueryException.php similarity index 79% rename from core/modules/entity/lib/Drupal/entity/EntityFieldQueryException.php rename to core/lib/Drupal/Core/Entity/EntityFieldQueryException.php index 12f2a1c..bf792a5 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityFieldQueryException.php +++ b/core/lib/Drupal/Core/Entity/EntityFieldQueryException.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\EntityFieldQueryException. + * Definition of Drupal\Core\Entity\EntityFieldQueryException. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; use Exception; diff --git a/core/modules/entity/lib/Drupal/entity/EntityFormController.php b/core/lib/Drupal/Core/Entity/EntityFormController.php similarity index 89% rename from core/modules/entity/lib/Drupal/entity/EntityFormController.php rename to core/lib/Drupal/Core/Entity/EntityFormController.php index dabb330..2828d5f 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityFormController.php +++ b/core/lib/Drupal/Core/Entity/EntityFormController.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\EntityFormController. + * Definition of Drupal\Core\Entity\EntityFormController. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; /** * Base class for entity form controllers. @@ -23,14 +23,14 @@ class EntityFormController implements EntityFormControllerInterface { protected $operation; /** - * Implements Drupal\entity\EntityFormControllerInterface::__construct(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::__construct(). */ public function __construct($operation) { $this->operation = $operation; } /** - * Implements Drupal\entity\EntityFormControllerInterface::build(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::build(). */ public function build(array $form, array &$form_state, EntityInterface $entity) { @@ -68,7 +68,7 @@ protected function init(array &$form_state, EntityInterface $entity) { /** * Returns the actual form array to be built. * - * @see Drupal\entity\EntityFormController::build() + * @see Drupal\Core\Entity\EntityFormController::build() */ public function form(array $form, array &$form_state, EntityInterface $entity) { // @todo Exploit the Property API to generate the default widgets for the @@ -142,7 +142,7 @@ protected function actions(array $form, array &$form_state) { } /** - * Implements Drupal\entity\EntityFormControllerInterface::validate(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::validate(). */ public function validate(array $form, array &$form_state) { // @todo Exploit the Property API to validate the values submitted for the @@ -161,7 +161,7 @@ public function validate(array $form, array &$form_state) { } /** - * Implements Drupal\entity\EntityFormControllerInterface::submit(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::submit(). * * This is the default entity object builder function. It is called before any * other submit handler to build the new entity object to be passed to the @@ -205,7 +205,7 @@ public function delete(array $form, array &$form_state) { } /** - * Implements Drupal\entity\EntityFormControllerInterface::getFormLangcode(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::getFormLangcode(). */ public function getFormLangcode(array $form_state) { $entity = $this->getEntity($form_state); @@ -231,7 +231,7 @@ public function getFormLangcode(array $form_state) { } /** - * Implements Drupal\entity\EntityFormControllerInterface::buildEntity(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::buildEntity(). */ public function buildEntity(array $form, array &$form_state) { $entity = clone $this->getEntity($form_state); @@ -242,14 +242,14 @@ public function buildEntity(array $form, array &$form_state) { } /** - * Implements Drupal\entity\EntityFormControllerInterface::getEntity(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::getEntity(). */ public function getEntity(array $form_state) { return isset($form_state['entity']) ? $form_state['entity'] : NULL; } /** - * Implements Drupal\entity\EntityFormControllerInterface::setEntity(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::setEntity(). */ public function setEntity(EntityInterface $entity, array &$form_state) { $form_state['entity'] = $entity; @@ -263,7 +263,7 @@ protected function prepareEntity(EntityInterface $entity) { } /** - * Implements Drupal\entity\EntityFormControllerInterface::getOperation(). + * Implements Drupal\Core\Entity\EntityFormControllerInterface::getOperation(). */ public function getOperation() { return $this->operation; diff --git a/core/modules/entity/lib/Drupal/entity/EntityFormControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityFormControllerInterface.php similarity index 88% rename from core/modules/entity/lib/Drupal/entity/EntityFormControllerInterface.php rename to core/lib/Drupal/Core/Entity/EntityFormControllerInterface.php index 95fb2fc..72c97f1 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityFormControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityFormControllerInterface.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\EntityFormControllerInterface. + * Definition of Drupal\Core\Entity\EntityFormControllerInterface. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; /** * Defines a common interface for entity form controller classes. @@ -32,7 +32,7 @@ public function __construct($operation); * An associative array containing the current state of the form. * @param string $entity_type * The type of the entity being edited. - * @param \Drupal\entity\EntityInterface $entity + * @param \Drupal\Core\Entity\EntityInterface $entity * The entity being edited. * * @return array @@ -67,7 +67,7 @@ public function getOperation(); * @param array $form_state * An associative array containing the current state of the form. * - * @return \Drupal\entity\EntityInterface + * @return \Drupal\Core\Entity\EntityInterface * The current form entity. */ public function getEntity(array $form_state); @@ -77,11 +77,11 @@ public function getEntity(array $form_state); * * Sets the form entity which will be used for populating form element * defaults. Usually, the form entity gets updated by - * \Drupal\entity\EntityFormControllerInterface::submit(), however this may + * \Drupal\Core\Entity\EntityFormControllerInterface::submit(), however this may * be used to completely exchange the form entity, e.g. when preparing the * rebuild of a multi-step form. * - * @param \Drupal\entity\EntityInterface $entity + * @param \Drupal\Core\Entity\EntityInterface $entity * The entity the current form should operate upon. * @param array $form_state * An associative array containing the current state of the form. @@ -95,14 +95,14 @@ public function setEntity(EntityInterface $entity, array &$form_state); * the submitted form values are copied to entity properties. The form's * entity remains unchanged. * - * @see \Drupal\entity\EntityFormControllerInterface::getEntity() + * @see \Drupal\Core\Entity\EntityFormControllerInterface::getEntity() * * @param array $form * A nested array form elements comprising the form. * @param array $form_state * An associative array containing the current state of the form. * - * @return \Drupal\entity\EntityInterface + * @return \Drupal\Core\Entity\EntityInterface * An updated copy of the form's entity object. */ public function buildEntity(array $form, array &$form_state); diff --git a/core/modules/entity/lib/Drupal/entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php similarity index 90% rename from core/modules/entity/lib/Drupal/entity/EntityInterface.php rename to core/lib/Drupal/Core/Entity/EntityInterface.php index 1fb2250..d8b6eae 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityInterface.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\EntityInterface. + * Definition of Drupal\Core\Entity\EntityInterface. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; /** * Defines a common interface for all entity objects. @@ -52,7 +52,7 @@ public function uuid(); * @return * TRUE if the entity is new, or FALSE if the entity has already been saved. * - * @see Drupal\entity\EntityInterface::enforceIsNew() + * @see Drupal\Core\Entity\EntityInterface::enforceIsNew() */ public function isNew(); @@ -66,7 +66,7 @@ public function isNew(); * (optional) Whether the entity should be forced to be new. Defaults to * TRUE. * - * @see Drupal\entity\EntityInterface::isNew() + * @see Drupal\Core\Entity\EntityInterface::isNew() */ public function enforceIsNew($value = TRUE); @@ -117,7 +117,7 @@ public function uri(); * The language object of the entity's default language, or FALSE if the * entity is not language-specific. * - * @see Drupal\entity\EntityInterface::translations() + * @see Drupal\Core\Entity\EntityInterface::translations() */ public function language(); @@ -127,7 +127,7 @@ public function language(); * @return * An array of language objects, keyed by language codes. * - * @see Drupal\entity\EntityInterface::language() + * @see Drupal\Core\Entity\EntityInterface::language() */ public function translations(); @@ -144,7 +144,7 @@ public function translations(); * @return * The property value, or NULL if it is not defined. * - * @see Drupal\entity\EntityInterface::language() + * @see Drupal\Core\Entity\EntityInterface::language() */ public function get($property_name, $langcode = NULL); @@ -160,7 +160,7 @@ public function get($property_name, $langcode = NULL); * language that should be used for setting the property. If set to NULL, * the entity's default language is being used. * - * @see Drupal\entity\EntityInterface::language() + * @see Drupal\Core\Entity\EntityInterface::language() */ public function set($property_name, $value, $langcode = NULL); @@ -170,7 +170,7 @@ public function set($property_name, $value, $langcode = NULL); * @return * Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed. * - * @throws Drupal\entity\EntityStorageException + * @throws Drupal\Core\Entity\EntityStorageException * In case of failures an exception is thrown. */ public function save(); @@ -178,7 +178,7 @@ public function save(); /** * Deletes an entity permanently. * - * @throws Drupal\entity\EntityStorageException + * @throws Drupal\Core\Entity\EntityStorageException * In case of failures an exception is thrown. */ public function delete(); @@ -186,7 +186,7 @@ public function delete(); /** * Creates a duplicate of the entity. * - * @return Drupal\entity\EntityInterface + * @return Drupal\Core\Entity\EntityInterface * A clone of the current entity with all identifiers unset, so saving * it inserts a new entity into the storage system. */ diff --git a/core/modules/entity/lib/Drupal/entity/EntityMalformedException.php b/core/lib/Drupal/Core/Entity/EntityMalformedException.php similarity index 64% rename from core/modules/entity/lib/Drupal/entity/EntityMalformedException.php rename to core/lib/Drupal/Core/Entity/EntityMalformedException.php index bd9b500..ae60cba 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityMalformedException.php +++ b/core/lib/Drupal/Core/Entity/EntityMalformedException.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\EntityMalformedException. + * Definition of Drupal\Core\Entity\EntityMalformedException. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; use Exception; diff --git a/core/modules/entity/lib/Drupal/entity/EntityStorageControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php similarity index 82% rename from core/modules/entity/lib/Drupal/entity/EntityStorageControllerInterface.php rename to core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php index 22b6b4c..3bc2328 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityStorageControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\EntityStorageControllerInterface. + * Definition of Drupal\Core\Entity\EntityStorageControllerInterface. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; /** * Defines a common interface for entity controller classes. @@ -15,13 +15,13 @@ * this interface. * * Most simple, SQL-based entity controllers will do better by extending - * Drupal\entity\DatabaseStorageController instead of implementing this + * Drupal\Core\Entity\DatabaseStorageController instead of implementing this * interface directly. */ interface EntityStorageControllerInterface { /** - * Constructs a new Drupal\entity\EntityStorageControllerInterface object. + * Constructs a new Drupal\Core\Entity\EntityStorageControllerInterface object. * * @param $entityType * The entity type for which the instance is created. @@ -54,7 +54,7 @@ public function load(array $ids = NULL); * @param int $revision_id * The revision id. * - * @return Drupal\entity\EntityInterface|false + * @return Drupal\Core\Entity\EntityInterface|false * The specified entity revision or FALSE if not found. */ public function loadRevision($revision_id); @@ -78,7 +78,7 @@ public function loadByProperties(array $values); * An array of values to set, keyed by property name. If the entity type has * bundles the bundle key has to be specified. * - * @return Drupal\entity\EntityInterface + * @return Drupal\Core\Entity\EntityInterface * A new entity object. */ public function create(array $values); @@ -89,7 +89,7 @@ public function create(array $values); * @param $ids * An array of entity IDs. * - * @throws Drupal\entity\EntityStorageException + * @throws Drupal\Core\Entity\EntityStorageException * In case of failures, an exception is thrown. */ public function delete($ids); @@ -97,14 +97,14 @@ public function delete($ids); /** * Saves the entity permanently. * - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity to save. * * @return * SAVED_NEW or SAVED_UPDATED is returned depending on the operation * performed. * - * @throws Drupal\entity\EntityStorageException + * @throws Drupal\Core\Entity\EntityStorageException * In case of failures, an exception is thrown. */ public function save(EntityInterface $entity); diff --git a/core/modules/entity/lib/Drupal/entity/EntityStorageException.php b/core/lib/Drupal/Core/Entity/EntityStorageException.php similarity index 64% rename from core/modules/entity/lib/Drupal/entity/EntityStorageException.php rename to core/lib/Drupal/Core/Entity/EntityStorageException.php index dff3e93..53ff738 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityStorageException.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageException.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\EntityStorageException. + * Definition of Drupal\Core\Entity\EntityStorageException. */ -namespace Drupal\entity; +namespace Drupal\Core\Entity; use Exception; diff --git a/core/modules/comment/comment.api.php b/core/modules/comment/comment.api.php index fded934..95c3e1d 100644 --- a/core/modules/comment/comment.api.php +++ b/core/modules/comment/comment.api.php @@ -1,6 +1,6 @@ cid; } /** - * Implements Drupal\entity\EntityInterface::bundle(). + * Implements Drupal\Core\Entity\EntityInterface::bundle(). */ public function bundle() { return $this->node_type; diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php index f0f16c2..7dae92d 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php @@ -7,8 +7,8 @@ namespace Drupal\comment; -use Drupal\entity\EntityInterface; -use Drupal\entity\EntityFormController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityFormController; /** * Base for controller for comment forms. @@ -16,7 +16,7 @@ class CommentFormController extends EntityFormController { /** - * Overrides Drupal\entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityFormController::form(). */ public function form(array $form, array &$form_state, EntityInterface $comment) { global $user; @@ -193,7 +193,7 @@ public function form(array $form, array &$form_state, EntityInterface $comment) } /** - * Overrides Drupal\entity\EntityFormController::actions(). + * Overrides Drupal\Core\Entity\EntityFormController::actions(). */ protected function actions(array $form, array &$form_state) { $element = parent::actions($form, $form_state); @@ -227,7 +227,7 @@ protected function actions(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::validate(). + * Overrides Drupal\Core\Entity\EntityFormController::validate(). */ public function validate(array $form, array &$form_state) { parent::validate($form, $form_state); @@ -264,7 +264,7 @@ public function validate(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityFormController::submit(). */ public function submit(array $form, array &$form_state) { $comment = parent::submit($form, $form_state); @@ -328,7 +328,7 @@ public function preview(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityFormController::save(). */ public function save(array $form, array &$form_state) { $node = node_load($form_state['values']['nid']); diff --git a/core/modules/comment/lib/Drupal/comment/CommentStorageController.php b/core/modules/comment/lib/Drupal/comment/CommentStorageController.php index 5dcda40..26cc6e0 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentStorageController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentStorageController.php @@ -7,14 +7,14 @@ namespace Drupal\comment; -use Drupal\entity\EntityInterface; -use Drupal\entity\DatabaseStorageController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\DatabaseStorageController; use LogicException; /** * Defines the controller class for comments. * - * This extends the Drupal\entity\DatabaseStorageController class, adding + * This extends the Drupal\Core\Entity\DatabaseStorageController class, adding * required special handling for comment entities. */ class CommentStorageController extends DatabaseStorageController { @@ -25,7 +25,7 @@ class CommentStorageController extends DatabaseStorageController { /** - * Overrides Drupal\entity\DatabaseStorageController::buildQuery(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::buildQuery(). */ protected function buildQuery($ids, $revision_id = FALSE) { $query = parent::buildQuery($ids, $revision_id); @@ -39,7 +39,7 @@ protected function buildQuery($ids, $revision_id = FALSE) { } /** - * Overrides Drupal\entity\DatabaseStorageController::attachLoad(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::attachLoad(). */ protected function attachLoad(&$comments, $load_revision = FALSE) { // Set up standard comment properties. @@ -53,7 +53,7 @@ protected function attachLoad(&$comments, $load_revision = FALSE) { } /** - * Overrides Drupal\entity\DatabaseStorageController::preSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::preSave(). * * @see comment_int_to_alphadecimal() * @see comment_alphadecimal_to_int() @@ -149,7 +149,7 @@ protected function preSave(EntityInterface $comment) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postSave(). */ protected function postSave(EntityInterface $comment, $update) { $this->releaseThreadLock(); @@ -161,7 +161,7 @@ protected function postSave(EntityInterface $comment, $update) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postDelete(). */ protected function postDelete($comments) { // Delete the comments' replies. diff --git a/core/modules/config/lib/Drupal/config/ConfigEntityBase.php b/core/modules/config/lib/Drupal/config/ConfigEntityBase.php index 921ab36..dabc121 100644 --- a/core/modules/config/lib/Drupal/config/ConfigEntityBase.php +++ b/core/modules/config/lib/Drupal/config/ConfigEntityBase.php @@ -7,7 +7,7 @@ namespace Drupal\config; -use Drupal\entity\Entity; +use Drupal\Core\Entity\Entity; /** * Defines a base configuration entity class. diff --git a/core/modules/config/lib/Drupal/config/ConfigEntityInterface.php b/core/modules/config/lib/Drupal/config/ConfigEntityInterface.php index ee4bb93..8d6c57c 100644 --- a/core/modules/config/lib/Drupal/config/ConfigEntityInterface.php +++ b/core/modules/config/lib/Drupal/config/ConfigEntityInterface.php @@ -7,7 +7,7 @@ namespace Drupal\config; -use Drupal\entity\EntityInterface; +use Drupal\Core\Entity\EntityInterface; /** * Defines the interface common for all configuration entities. diff --git a/core/modules/config/lib/Drupal/config/ConfigStorageController.php b/core/modules/config/lib/Drupal/config/ConfigStorageController.php index 9247627..4c4884c 100644 --- a/core/modules/config/lib/Drupal/config/ConfigStorageController.php +++ b/core/modules/config/lib/Drupal/config/ConfigStorageController.php @@ -8,8 +8,8 @@ namespace Drupal\config; use Drupal\Component\Uuid\Uuid; -use Drupal\entity\EntityInterface; -use Drupal\entity\EntityStorageControllerInterface; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityStorageControllerInterface; /** * Defines the storage controller class for configuration entities. @@ -56,7 +56,7 @@ class ConfigStorageController implements EntityStorageControllerInterface { protected $uuidKey = 'uuid'; /** - * Implements Drupal\entity\EntityStorageControllerInterface::__construct(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::__construct(). * * Sets basic variables. */ @@ -68,7 +68,7 @@ public function __construct($entityType) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::resetCache(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::resetCache(). */ public function resetCache(array $ids = NULL) { // The configuration system is fast enough and/or implements its own @@ -76,7 +76,7 @@ public function resetCache(array $ids = NULL) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::load(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::load(). */ public function load(array $ids = NULL) { $entities = array(); @@ -115,14 +115,14 @@ public function load(array $ids = NULL) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::loadRevision(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadRevision(). */ public function loadRevision($revision_id) { return FALSE; } /** - * Implements Drupal\entity\EntityStorageControllerInterface::loadByProperties(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadByProperties(). */ public function loadByProperties(array $values = array()) { return array(); @@ -209,10 +209,10 @@ protected function attachLoad(&$queried_entities, $revision_id = FALSE) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::create(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::create(). */ public function create(array $values) { - $class = isset($this->entityInfo['entity class']) ? $this->entityInfo['entity class'] : 'Drupal\entity\Entity'; + $class = isset($this->entityInfo['entity class']) ? $this->entityInfo['entity class'] : 'Drupal\Core\Entity\Entity'; $entity = new $class($values, $this->entityType); @@ -226,7 +226,7 @@ public function create(array $values) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::delete(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::delete(). */ public function delete($ids) { $entities = $ids ? $this->load($ids) : FALSE; @@ -252,7 +252,7 @@ public function delete($ids) { } /** - * Implements Drupal\entity\EntityStorageControllerInterface::save(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::save(). */ public function save(EntityInterface $entity) { $prefix = $this->entityInfo['config prefix'] . '.'; diff --git a/core/modules/entity/entity.info b/core/modules/entity/entity.info deleted file mode 100644 index 21bb5a3..0000000 --- a/core/modules/entity/entity.info +++ /dev/null @@ -1,6 +0,0 @@ -name = Entity -description = API for managing entities like nodes and users. -package = Core -version = VERSION -core = 8.x -required = TRUE diff --git a/core/modules/field/field.api.php b/core/modules/field/field.api.php index 1f76def..a407c74 100644 --- a/core/modules/field/field.api.php +++ b/core/modules/field/field.api.php @@ -1942,18 +1942,18 @@ function hook_field_storage_delete_revision($entity_type, $entity, $fields) { } /** - * Execute a Drupal\entity\EntityFieldQuery. + * Execute a Drupal\Core\Entity\EntityFieldQuery. * * This hook is called to find the entities having certain entity and field * conditions and sort them in the given field order. If the field storage * engine also handles property sorts and orders, it should unset those * properties in the called object to signal that those have been handled. * - * @param Drupal\entity\EntityFieldQuery $query + * @param Drupal\Core\Entity\EntityFieldQuery $query * An EntityFieldQuery. * * @return - * See Drupal\entity\EntityFieldQuery::execute() for the return values. + * See Drupal\Core\Entity\EntityFieldQuery::execute() for the return values. */ function hook_field_storage_query($query) { $groups = array(); diff --git a/core/modules/field/field.attach.inc b/core/modules/field/field.attach.inc index 611b577..7c2acdb 100644 --- a/core/modules/field/field.attach.inc +++ b/core/modules/field/field.attach.inc @@ -6,7 +6,7 @@ */ use Drupal\field\FieldValidationException; -use Drupal\entity\EntityInterface; +use Drupal\Core\Entity\EntityInterface; /** * @defgroup field_storage Field Storage API @@ -123,7 +123,7 @@ * - prepare translation * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The fully formed $entity_type entity. * @param $a * - The $form in the 'form' operation. @@ -519,7 +519,7 @@ function _field_invoke_get_instances($entity_type, $bundle, $options) { * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity for which to load form elements, used to initialize * default form values. * @param $form @@ -739,7 +739,7 @@ function field_attach_load_revision($entity_type, $entities, $options = array()) * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity with fields to validate. * @throws Drupal\field\FieldValidationException * If validation errors are found, a FieldValidationException is thrown. The @@ -784,7 +784,7 @@ function field_attach_validate($entity_type, $entity) { * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity being submitted. The 'bundle', 'id' and (if applicable) * 'revision' keys should be present. The actual field values will be read * from $form_state['values']. @@ -824,7 +824,7 @@ function field_attach_form_validate($entity_type, EntityInterface $entity, $form * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity being submitted. The 'bundle', 'id' and (if applicable) * 'revision' keys should be present. The actual field values will be read * from $form_state['values']. @@ -876,7 +876,7 @@ function field_attach_presave($entity_type, $entity) { * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity with fields to save. * @return * Default values (if any) will be added to the $entity parameter for fields @@ -925,7 +925,7 @@ function field_attach_insert($entity_type, EntityInterface $entity) { * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity with fields to save. */ function field_attach_update($entity_type, EntityInterface $entity) { @@ -978,7 +978,7 @@ function field_attach_update($entity_type, EntityInterface $entity) { * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity whose field data to delete. */ function field_attach_delete($entity_type, $entity) { @@ -1013,7 +1013,7 @@ function field_attach_delete($entity_type, $entity) { * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity with fields to save. */ function field_attach_delete_revision($entity_type, $entity) { @@ -1128,7 +1128,7 @@ function field_attach_prepare_view($entity_type, $entities, $view_mode, $langcod * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity with fields to render. * @param $view_mode * View mode, e.g. 'full', 'teaser'... @@ -1181,7 +1181,7 @@ function field_attach_view($entity_type, EntityInterface $entity, $view_mode, $l * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity with fields to render. * @param $element * The structured array containing the values ready for rendering. @@ -1221,7 +1221,7 @@ function field_attach_preprocess($entity_type, EntityInterface $entity, $element * * @param $entity_type * The type of $entity; e.g. 'node' or 'user'. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity to be prepared for translation. * @param $langcode * The language the entity has to be translated in. diff --git a/core/modules/field/field.crud.inc b/core/modules/field/field.crud.inc index b748c51..f1e5481 100644 --- a/core/modules/field/field.crud.inc +++ b/core/modules/field/field.crud.inc @@ -6,7 +6,7 @@ */ use Drupal\field\FieldException; -use Drupal\entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQuery; /** * @defgroup field_crud Field CRUD API diff --git a/core/modules/field/field.info b/core/modules/field/field.info index c8da762..88529e2 100644 --- a/core/modules/field/field.info +++ b/core/modules/field/field.info @@ -4,6 +4,5 @@ package = Core version = VERSION core = 8.x dependencies[] = field_sql_storage -dependencies[] = entity required = TRUE stylesheets[all][] = theme/field.css diff --git a/core/modules/field/field.module b/core/modules/field/field.module index e75111e..72b6d91 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -4,7 +4,7 @@ * Attach custom data fields to Drupal entities. */ -use Drupal\entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQuery; use Drupal\Core\Template\Attribute; /* diff --git a/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php b/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php index 8021673..84b6f06 100644 --- a/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php @@ -7,7 +7,7 @@ namespace Drupal\field\Tests; -use Drupal\entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQuery; /** * Unit test class for field bulk delete and batch purge functionality. diff --git a/core/modules/field/modules/field_sql_storage/field_sql_storage.module b/core/modules/field/modules/field_sql_storage/field_sql_storage.module index 91956ad..ba1e710 100644 --- a/core/modules/field/modules/field_sql_storage/field_sql_storage.module +++ b/core/modules/field/modules/field_sql_storage/field_sql_storage.module @@ -7,8 +7,8 @@ use Drupal\Core\Database\Database; use Drupal\Core\Database\Query\Select; -use Drupal\entity\EntityFieldQuery; -use Drupal\entity\EntityFieldQueryException; +use Drupal\Core\Entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQueryException; use Drupal\field\FieldUpdateForbiddenException; /** @@ -620,7 +620,7 @@ function _field_sql_storage_query_join_entity(Select $select_query, $entity_type /** * Adds field (meta) conditions to the given query objects respecting groupings. * - * @param Drupal\entity\EntityFieldQuery $query + * @param Drupal\Core\Entity\EntityFieldQuery $query * The field query object to be processed. * @param SelectQuery $select_query * The SelectQuery that should get grouping conditions. diff --git a/core/modules/field/modules/options/options.module b/core/modules/field/modules/options/options.module index 3cda56b..4d70277 100644 --- a/core/modules/field/modules/options/options.module +++ b/core/modules/field/modules/options/options.module @@ -6,7 +6,7 @@ */ use Drupal\field\FieldUpdateForbiddenException; -use Drupal\entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQuery; /** * Implements hook_help(). diff --git a/core/modules/field/tests/modules/field_test/field_test.entity.inc b/core/modules/field/tests/modules/field_test/field_test.entity.inc index 1601f09..4819b3f 100644 --- a/core/modules/field/tests/modules/field_test/field_test.entity.inc +++ b/core/modules/field/tests/modules/field_test/field_test.entity.inc @@ -5,7 +5,7 @@ * Defines an entity type. */ -use Drupal\entity\EntityInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\field_test\TestEntity; /** diff --git a/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module index ea38362..6dfbb15 100644 --- a/core/modules/field/tests/modules/field_test/field_test.module +++ b/core/modules/field/tests/modules/field_test/field_test.module @@ -13,7 +13,7 @@ * test helper functions */ -use Drupal\entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQuery; require_once DRUPAL_ROOT . '/core/modules/field/tests/modules/field_test/field_test.entity.inc'; require_once DRUPAL_ROOT . '/core/modules/field/tests/modules/field_test/field_test.field.inc'; @@ -278,7 +278,7 @@ function field_test_field_widget_form_alter(&$element, &$form_state, $context) { /** * Implements hook_query_TAG_alter() for tag 'efq_table_prefixing_test'. * - * @see Drupal\entity\Tests\EntityFieldQueryTest::testTablePrefixing() + * @see Drupal\system\Tests\Entity\EntityFieldQueryTest::testTablePrefixing() */ function field_test_query_efq_table_prefixing_test_alter(&$query) { // Add an additional join onto the entity base table. This will cause an diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntity.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntity.php index fb1335b..18cfff5 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntity.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntity.php @@ -7,7 +7,7 @@ namespace Drupal\field_test; -use Drupal\entity\Entity; +use Drupal\Core\Entity\Entity; /** * Test entity class. @@ -36,21 +36,21 @@ class TestEntity extends Entity { public $fttype; /** - * Overrides Drupal\entity\Entity::id(). + * Overrides Drupal\Core\Entity\Entity::id(). */ public function id() { return $this->ftid; } /** - * Overrides Drupal\entity\Entity::getRevisionId(). + * Overrides Drupal\Core\Entity\Entity::getRevisionId(). */ public function getRevisionId() { return $this->ftvid; } /** - * Overrides Drupal\entity\Entity::bundle(). + * Overrides Drupal\Core\Entity\Entity::bundle(). */ public function bundle() { return !empty($this->fttype) ? $this->fttype : $this->entityType(); diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityController.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityController.php index 3bdab77..16f66df 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityController.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityController.php @@ -7,8 +7,8 @@ namespace Drupal\field_test; -use Drupal\entity\DatabaseStorageController; -use Drupal\entity\EntityInterface; +use Drupal\Core\Entity\DatabaseStorageController; +use Drupal\Core\Entity\EntityInterface; /** * Controller class for the test entity entity types. @@ -16,7 +16,7 @@ class TestEntityController extends DatabaseStorageController { /** - * Overrides Drupal\entity\DatabaseStorageController::preSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::preSave(). */ public function preSave(EntityInterface $entity) { // Prepare for a new revision. @@ -27,7 +27,7 @@ public function preSave(EntityInterface $entity) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postSave(). */ public function postSave(EntityInterface $entity, $update) { // Only the test_entity entity type has revisions. diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityFormController.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityFormController.php index d860d5f..93ef2aa 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityFormController.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/TestEntityFormController.php @@ -7,8 +7,8 @@ namespace Drupal\field_test; -use Drupal\entity\EntityInterface; -use Drupal\entity\EntityFormController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityFormController; /** * Form controller for the test entity edit forms. @@ -16,7 +16,7 @@ class TestEntityFormController extends EntityFormController { /** - * Overrides Drupal\entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityFormController::form(). */ public function form(array $form, array &$form_state, EntityInterface $entity) { $form = parent::form($form, $form_state, $entity); @@ -33,7 +33,7 @@ public function form(array $form, array &$form_state, EntityInterface $entity) { } /** - * Overrides Drupal\entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityFormController::save(). */ public function save(array $form, array &$form_state) { $entity = $this->getEntity($form_state); diff --git a/core/modules/file/file.api.php b/core/modules/file/file.api.php index 2583d83..c0b0d52 100644 --- a/core/modules/file/file.api.php +++ b/core/modules/file/file.api.php @@ -172,7 +172,7 @@ function hook_file_delete(Drupal\file\File $file) { * * @param $field * The field to which the file belongs. - * @param Drupal\entity\EntityInterface $entity + * @param Drupal\Core\Entity\EntityInterface $entity * The entity which references the file. * @param Drupal\file\File $file * The file entity that is being requested. @@ -184,7 +184,7 @@ function hook_file_delete(Drupal\file\File $file) { * * @see hook_field_access(). */ -function hook_file_download_access($field, Drupal\entity\EntityInterface $entity, Drupal\file\File $file) { +function hook_file_download_access($field, Drupal\Core\Entity\EntityInterface $entity, Drupal\file\File $file) { if ($entity->entityType() == 'node') { return node_access('view', $entity); } diff --git a/core/modules/file/file.module b/core/modules/file/file.module index 3b81b1a..53dc798 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -5,7 +5,7 @@ * Defines a "managed_file" Form API field and a "file" field for Field module. */ -use Drupal\entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQuery; use Drupal\file\File; use Drupal\Core\Template\Attribute; use Symfony\Component\HttpFoundation\JsonResponse; @@ -116,7 +116,7 @@ function file_entity_info() { * @see hook_file_load() * @see file_load() * @see entity_load() - * @see Drupal\entity\EntityFieldQuery + * @see Drupal\Core\Entity\EntityFieldQuery */ function file_load_multiple(array $fids = NULL) { return entity_load_multiple('file', $fids); diff --git a/core/modules/file/lib/Drupal/file/File.php b/core/modules/file/lib/Drupal/file/File.php index e70e3d0..9b965e3 100644 --- a/core/modules/file/lib/Drupal/file/File.php +++ b/core/modules/file/lib/Drupal/file/File.php @@ -7,7 +7,7 @@ namespace Drupal\file; -use Drupal\entity\Entity; +use Drupal\Core\Entity\Entity; /** * Defines the file entity class. @@ -92,7 +92,7 @@ class File extends Entity { public $timestamp; /** - * Overrides Drupal\entity\Entity::id(). + * Overrides Drupal\Core\Entity\Entity::id(). */ public function id() { return $this->fid; diff --git a/core/modules/file/lib/Drupal/file/FileStorageController.php b/core/modules/file/lib/Drupal/file/FileStorageController.php index 356e5c4..195ab95 100644 --- a/core/modules/file/lib/Drupal/file/FileStorageController.php +++ b/core/modules/file/lib/Drupal/file/FileStorageController.php @@ -7,8 +7,8 @@ namespace Drupal\file; -use Drupal\entity\DatabaseStorageController; -use Drupal\entity\EntityInterface; +use Drupal\Core\Entity\DatabaseStorageController; +use Drupal\Core\Entity\EntityInterface; /** * File storage controller for files. @@ -16,7 +16,7 @@ class FileStorageController extends DatabaseStorageController { /** - * Overrides Drupal\entity\DatabaseStorageController::create(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::create(). */ public function create(array $values) { // Automatically detect filename if not set. @@ -32,7 +32,7 @@ public function create(array $values) { } /** - * Overrides Drupal\entity\DatabaseStorageController::presave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::presave(). */ protected function preSave(EntityInterface $entity) { $entity->timestamp = REQUEST_TIME; @@ -47,7 +47,7 @@ protected function preSave(EntityInterface $entity) { } /** - * Overrides Drupal\entity\DatabaseStorageController::preDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::preDelete(). */ public function preDelete($entities) { foreach ($entities as $entity) { diff --git a/core/modules/file/tests/file_module_test.module b/core/modules/file/tests/file_module_test.module index c9dd819..eae577e 100644 --- a/core/modules/file/tests/file_module_test.module +++ b/core/modules/file/tests/file_module_test.module @@ -5,7 +5,7 @@ * Provides File module pages for testing purposes. */ -use Drupal\entity\EntityInterface; +use Drupal\Core\Entity\EntityInterface; use Drupal\file\File; /** diff --git a/core/modules/node/lib/Drupal/node/Node.php b/core/modules/node/lib/Drupal/node/Node.php index 51077c7..45d93f0 100644 --- a/core/modules/node/lib/Drupal/node/Node.php +++ b/core/modules/node/lib/Drupal/node/Node.php @@ -7,8 +7,8 @@ namespace Drupal\node; -use Drupal\entity\ContentEntityInterface; -use Drupal\entity\Entity; +use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\Entity; /** * Defines the node entity class. @@ -163,21 +163,21 @@ class Node extends Entity implements ContentEntityInterface { public $revision_uid; /** - * Implements Drupal\entity\EntityInterface::id(). + * Implements Drupal\Core\Entity\EntityInterface::id(). */ public function id() { return $this->nid; } /** - * Implements Drupal\entity\EntityInterface::bundle(). + * Implements Drupal\Core\Entity\EntityInterface::bundle(). */ public function bundle() { return $this->type; } /** - * Overrides Drupal\entity\Entity::createDuplicate(). + * Overrides Drupal\Core\Entity\Entity::createDuplicate(). */ public function createDuplicate() { $duplicate = parent::createDuplicate(); @@ -186,7 +186,7 @@ public function createDuplicate() { } /** - * Overrides Drupal\entity\Entity::getRevisionId(). + * Overrides Drupal\Core\Entity\Entity::getRevisionId(). */ public function getRevisionId() { return $this->vid; diff --git a/core/modules/node/lib/Drupal/node/NodeFormController.php b/core/modules/node/lib/Drupal/node/NodeFormController.php index b27e1a6..7924acc 100644 --- a/core/modules/node/lib/Drupal/node/NodeFormController.php +++ b/core/modules/node/lib/Drupal/node/NodeFormController.php @@ -7,8 +7,8 @@ namespace Drupal\node; -use Drupal\entity\EntityInterface; -use Drupal\entity\EntityFormController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityFormController; /** * Form controller for the node edit forms. @@ -21,7 +21,7 @@ class NodeFormController extends EntityFormController { * Fills in a few default values, and then invokes hook_prepare() on the node * type module, and hook_node_prepare() on all modules. * - * Overrides Drupal\entity\EntityFormController::prepareEntity(). + * Overrides Drupal\Core\Entity\EntityFormController::prepareEntity(). */ protected function prepareEntity(EntityInterface $node) { // Set up default values, if required. @@ -51,7 +51,7 @@ protected function prepareEntity(EntityInterface $node) { } /** - * Overrides Drupal\entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityFormController::form(). */ public function form(array $form, array &$form_state, EntityInterface $node) { $user_config = config('user.settings'); @@ -243,7 +243,7 @@ public function form(array $form, array &$form_state, EntityInterface $node) { } /** - * Overrides Drupal\entity\EntityFormController::actions(). + * Overrides Drupal\Core\Entity\EntityFormController::actions(). */ protected function actions(array $form, array &$form_state) { $element = parent::actions($form, $form_state); @@ -269,7 +269,7 @@ protected function actions(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::validate(). + * Overrides Drupal\Core\Entity\EntityFormController::validate(). */ public function validate(array $form, array &$form_state) { $node = $this->buildEntity($form, $form_state); @@ -314,7 +314,7 @@ public function validate(array $form, array &$form_state) { * form state's entity with the current step's values before proceeding to the * next step. * - * Overrides Drupal\entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityFormController::submit(). */ public function submit(array $form, array &$form_state) { $this->submitNodeLanguage($form, $form_state); @@ -376,7 +376,7 @@ public function preview(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityFormController::save(). */ public function save(array $form, array &$form_state) { $node = $this->getEntity($form_state); @@ -412,7 +412,7 @@ public function save(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::delete(). + * Overrides Drupal\Core\Entity\EntityFormController::delete(). */ public function delete(array $form, array &$form_state) { $destination = array(); diff --git a/core/modules/node/lib/Drupal/node/NodeStorageController.php b/core/modules/node/lib/Drupal/node/NodeStorageController.php index 1b1eedd..55b52c3 100644 --- a/core/modules/node/lib/Drupal/node/NodeStorageController.php +++ b/core/modules/node/lib/Drupal/node/NodeStorageController.php @@ -7,21 +7,21 @@ namespace Drupal\node; -use Drupal\entity\DatabaseStorageController; -use Drupal\entity\EntityInterface; -use Drupal\entity\EntityStorageException; +use Drupal\Core\Entity\DatabaseStorageController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityStorageException; use Exception; /** * Controller class for nodes. * - * This extends the Drupal\entity\DatabaseStorageController class, adding + * This extends the Drupal\Core\Entity\DatabaseStorageController class, adding * required special handling for node entities. */ class NodeStorageController extends DatabaseStorageController { /** - * Overrides Drupal\entity\DatabaseStorageController::create(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::create(). */ public function create(array $values) { $node = parent::create($values); @@ -35,7 +35,7 @@ public function create(array $values) { } /** - * Overrides Drupal\entity\DatabaseStorageController::delete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::delete(). */ public function delete($ids) { $entities = $ids ? $this->load($ids) : FALSE; @@ -80,7 +80,7 @@ public function delete($ids) { } /** - * Overrides Drupal\entity\DatabaseStorageController::save(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::save(). */ public function save(EntityInterface $entity) { $transaction = db_transaction(); @@ -138,7 +138,7 @@ public function save(EntityInterface $entity) { /** * Saves a node revision. * - * @param Drupal\entity\EntityInterface $node + * @param Drupal\Core\Entity\EntityInterface $node * The node entity. */ protected function saveRevision(EntityInterface $entity) { @@ -164,7 +164,7 @@ protected function saveRevision(EntityInterface $entity) { } /** - * Overrides Drupal\entity\DatabaseStorageController::attachLoad(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::attachLoad(). */ protected function attachLoad(&$nodes, $load_revision = FALSE) { // Create an array of nodes for each content type and pass this to the @@ -189,7 +189,7 @@ protected function attachLoad(&$nodes, $load_revision = FALSE) { } /** - * Overrides Drupal\entity\DatabaseStorageController::buildQuery(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::buildQuery(). */ protected function buildQuery($ids, $revision_id = FALSE) { // Ensure that uid is taken from the {node} table, @@ -204,7 +204,7 @@ protected function buildQuery($ids, $revision_id = FALSE) { } /** - * Overrides Drupal\entity\DatabaseStorageController::invokeHook(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::invokeHook(). */ protected function invokeHook($hook, EntityInterface $node) { if ($hook == 'insert' || $hook == 'update') { @@ -253,7 +253,7 @@ protected function invokeHook($hook, EntityInterface $node) { } /** - * Overrides Drupal\entity\DatabaseStorageController::preSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::preSave(). */ protected function preSave(EntityInterface $node) { // Before saving the node, set changed and revision times. @@ -269,7 +269,7 @@ protected function preSave(EntityInterface $node) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postSave(). */ function postSave(EntityInterface $node, $update) { // Update the node access table for this node, but only if it is the @@ -280,7 +280,7 @@ function postSave(EntityInterface $node, $update) { } } /** - * Overrides Drupal\entity\DatabaseStorageController::preDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::preDelete(). */ function preDelete($entities) { if (module_exists('search')) { @@ -291,7 +291,7 @@ function preDelete($entities) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postDelete(). */ protected function postDelete($nodes) { // Delete values from other tables also referencing this node. diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index a73b851..8032d51 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -1,6 +1,6 @@ assertEqual($info['label'], 'Entity Cache Test', 'Entity info label is correct.'); - $this->assertEqual($info['controller class'], 'Drupal\entity\DatabaseStorageController', 'Entity controller class info is correct.'); + $this->assertEqual($info['controller class'], 'Drupal\Core\Entity\DatabaseStorageController', 'Entity controller class info is correct.'); } } diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityApiTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiTest.php similarity index 95% rename from core/modules/entity/lib/Drupal/entity/Tests/EntityApiTest.php rename to core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiTest.php index e8d979f..587b6f8 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityApiTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiTest.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\Tests\EntityApiTest. + * Definition of Drupal\system\Tests\Entity\EntityApiTest. */ -namespace Drupal\entity\Tests; +namespace Drupal\system\Tests\Entity; use Drupal\simpletest\WebTestBase; @@ -19,7 +19,7 @@ class EntityApiTest extends WebTestBase { * * @var array */ - public static $modules = array('entity', 'entity_test'); + public static $modules = array('entity_test'); public static function getInfo() { return array( diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityCrudHookTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php similarity index 99% rename from core/modules/entity/lib/Drupal/entity/Tests/EntityCrudHookTest.php rename to core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php index 251dd3c..4afb574 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityCrudHookTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCrudHookTest.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\Tests\EntityCrudHookTest. + * Definition of Drupal\system\Tests\Entity\EntityCrudHookTest. */ -namespace Drupal\entity\Tests; +namespace Drupal\system\Tests\Entity; use Drupal\simpletest\WebTestBase; diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityFieldQueryTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFieldQueryTest.php similarity index 99% rename from core/modules/entity/lib/Drupal/entity/Tests/EntityFieldQueryTest.php rename to core/modules/system/lib/Drupal/system/Tests/Entity/EntityFieldQueryTest.php index 8015c67..d208125 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityFieldQueryTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFieldQueryTest.php @@ -2,19 +2,19 @@ /** * @file - * Definition of Drupal\entity\Tests\EntityFieldQueryTest. + * Definition of Drupal\system\Tests\Entity\EntityFieldQueryTest. */ -namespace Drupal\entity\Tests; +namespace Drupal\system\Tests\Entity; use Drupal\simpletest\WebTestBase; -use Drupal\entity\EntityFieldQuery; -use Drupal\entity\EntityFieldQueryException; +use Drupal\Core\Entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQueryException; use stdClass; use Exception; /** - * Tests Drupal\entity\EntityFieldQuery. + * Tests Drupal\Core\Entity\EntityFieldQuery. */ class EntityFieldQueryTest extends WebTestBase { diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php similarity index 97% rename from core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationFormTest.php rename to core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php index 3908184..2036d23 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationFormTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationFormTest.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\Tests\EntityTranslationFormTest. + * Definition of Drupal\system\Tests\Entity\EntityTranslationFormTest. */ -namespace Drupal\entity\Tests; +namespace Drupal\system\Tests\Entity; use Exception; use InvalidArgumentException; diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php similarity index 99% rename from core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationTest.php rename to core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php index 252e048..805d52c 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityTranslationTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\Tests\EntityTranslationTest. + * Definition of Drupal\system\Tests\Entity\EntityTranslationTest. */ -namespace Drupal\entity\Tests; +namespace Drupal\system\Tests\Entity; use Exception; use InvalidArgumentException; diff --git a/core/modules/entity/lib/Drupal/entity/Tests/EntityUUIDTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUUIDTest.php similarity index 95% rename from core/modules/entity/lib/Drupal/entity/Tests/EntityUUIDTest.php rename to core/modules/system/lib/Drupal/system/Tests/Entity/EntityUUIDTest.php index e7607dc..741069b 100644 --- a/core/modules/entity/lib/Drupal/entity/Tests/EntityUUIDTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityUUIDTest.php @@ -2,10 +2,10 @@ /** * @file - * Definition of Drupal\entity\Tests\EntityUUIDTest. + * Definition of Drupal\system\Tests\Entity\EntityUUIDTest. */ -namespace Drupal\entity\Tests; +namespace Drupal\system\Tests\Entity; use Drupal\Component\Uuid\Uuid; use Drupal\simpletest\WebTestBase; diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareMinimalUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareMinimalUpgradePathTest.php index 5956394..a93c6b9 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareMinimalUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareMinimalUpgradePathTest.php @@ -38,9 +38,6 @@ public function setUp() { public function testBasicMinimalUpgrade() { $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); - // Ensure that the new Entity module is enabled after upgrade. - $this->assertTrue(module_exists('entity'), 'Entity module enabled after upgrade.'); - // Hit the frontpage. $this->drupalGet(''); $this->assertResponse(200); diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareStandardUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareStandardUpgradePathTest.php index 1ac554c..1221cb8 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareStandardUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/BareStandardUpgradePathTest.php @@ -39,9 +39,6 @@ public function setUp() { public function testBasicStandardUpgrade() { $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); - // Ensure that the new Entity module is enabled after upgrade. - $this->assertTrue(module_exists('entity'), 'Entity module enabled after upgrade.'); - // Hit the frontpage. $this->drupalGet(''); $this->assertResponse(200); diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledMinimalUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledMinimalUpgradePathTest.php index bd74caa..38a4113 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledMinimalUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledMinimalUpgradePathTest.php @@ -38,9 +38,6 @@ public function setUp() { public function testFilledMinimalUpgrade() { $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); - // Ensure that the new Entity module is enabled after upgrade. - $this->assertTrue(module_exists('entity'), 'Entity module enabled after upgrade.'); - // Hit the frontpage. $this->drupalGet(''); $this->assertResponse(200); diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledStandardUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledStandardUpgradePathTest.php index 0242830..d6c0527 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledStandardUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/FilledStandardUpgradePathTest.php @@ -39,9 +39,6 @@ public function setUp() { public function testFilledStandardUpgrade() { $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); - // Ensure that the new Entity module is enabled after upgrade. - $this->assertTrue(module_exists('entity'), 'Entity module enabled after upgrade.'); - // Hit the frontpage. $this->drupalGet(''); $this->assertResponse(200); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index ac983aa..8fce87c 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1496,13 +1496,6 @@ function system_update_last_removed() { */ /** - * Enable entity module. - */ -function system_update_8000() { - update_module_enable(array('entity')); -} - -/** * Move from the Garland theme. */ function system_update_8001() { diff --git a/core/modules/entity/tests/modules/entity_cache_test/entity_cache_test.info b/core/modules/system/tests/modules/entity_cache_test/entity_cache_test.info similarity index 75% rename from core/modules/entity/tests/modules/entity_cache_test/entity_cache_test.info rename to core/modules/system/tests/modules/entity_cache_test/entity_cache_test.info index c13496e..4625bbd 100644 --- a/core/modules/entity/tests/modules/entity_cache_test/entity_cache_test.info +++ b/core/modules/system/tests/modules/entity_cache_test/entity_cache_test.info @@ -3,5 +3,4 @@ description = "Support module for testing entity cache." package = Testing version = VERSION core = 8.x -dependencies[] = entity_cache_test_dependency hidden = TRUE diff --git a/core/modules/entity/tests/modules/entity_cache_test/entity_cache_test.module b/core/modules/system/tests/modules/entity_cache_test/entity_cache_test.module similarity index 100% rename from core/modules/entity/tests/modules/entity_cache_test/entity_cache_test.module rename to core/modules/system/tests/modules/entity_cache_test/entity_cache_test.module diff --git a/core/modules/entity/tests/modules/entity_cache_test_dependency/entity_cache_test_dependency.info b/core/modules/system/tests/modules/entity_cache_test_dependency/entity_cache_test_dependency.info similarity index 100% rename from core/modules/entity/tests/modules/entity_cache_test_dependency/entity_cache_test_dependency.info rename to core/modules/system/tests/modules/entity_cache_test_dependency/entity_cache_test_dependency.info diff --git a/core/modules/entity/tests/modules/entity_cache_test_dependency/entity_cache_test_dependency.module b/core/modules/system/tests/modules/entity_cache_test_dependency/entity_cache_test_dependency.module similarity index 100% rename from core/modules/entity/tests/modules/entity_cache_test_dependency/entity_cache_test_dependency.module rename to core/modules/system/tests/modules/entity_cache_test_dependency/entity_cache_test_dependency.module diff --git a/core/modules/entity/tests/modules/entity_crud_hook_test/entity_crud_hook_test.info b/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.info similarity index 100% rename from core/modules/entity/tests/modules/entity_crud_hook_test/entity_crud_hook_test.info rename to core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.info diff --git a/core/modules/entity/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module b/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module similarity index 99% rename from core/modules/entity/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module rename to core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module index 48a2876..8a1e43c 100644 --- a/core/modules/entity/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module +++ b/core/modules/system/tests/modules/entity_crud_hook_test/entity_crud_hook_test.module @@ -5,7 +5,7 @@ * Test module for the Entity CRUD API. */ -use Drupal\entity\EntityInterface; +use Drupal\Core\Entity\EntityInterface; /** * Implements hook_entity_presave(). diff --git a/core/modules/entity/tests/modules/entity_query_access_test/entity_query_access_test.info b/core/modules/system/tests/modules/entity_query_access_test/entity_query_access_test.info similarity index 100% rename from core/modules/entity/tests/modules/entity_query_access_test/entity_query_access_test.info rename to core/modules/system/tests/modules/entity_query_access_test/entity_query_access_test.info diff --git a/core/modules/entity/tests/modules/entity_query_access_test/entity_query_access_test.module b/core/modules/system/tests/modules/entity_query_access_test/entity_query_access_test.module similarity index 94% rename from core/modules/entity/tests/modules/entity_query_access_test/entity_query_access_test.module rename to core/modules/system/tests/modules/entity_query_access_test/entity_query_access_test.module index 262f3b7..2a4fd75 100644 --- a/core/modules/entity/tests/modules/entity_query_access_test/entity_query_access_test.module +++ b/core/modules/system/tests/modules/entity_query_access_test/entity_query_access_test.module @@ -5,8 +5,8 @@ * Helper module for testing EntityFieldQuery access on any type of entity. */ -use Drupal\entity\EntityFieldQuery; -use Drupal\entity\EntityFieldQueryException; +use Drupal\Core\Entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQueryException; /** * Implements hook_menu(). diff --git a/core/modules/entity/tests/modules/entity_test/entity_test.info b/core/modules/system/tests/modules/entity_test/entity_test.info similarity index 86% rename from core/modules/entity/tests/modules/entity_test/entity_test.info rename to core/modules/system/tests/modules/entity_test/entity_test.info index ae6006b..bf616ec 100644 --- a/core/modules/entity/tests/modules/entity_test/entity_test.info +++ b/core/modules/system/tests/modules/entity_test/entity_test.info @@ -3,5 +3,4 @@ description = Provides entity types based upon the CRUD API. package = Testing version = VERSION core = 8.x -dependencies[] = entity hidden = TRUE diff --git a/core/modules/entity/tests/modules/entity_test/entity_test.install b/core/modules/system/tests/modules/entity_test/entity_test.install similarity index 100% rename from core/modules/entity/tests/modules/entity_test/entity_test.install rename to core/modules/system/tests/modules/entity_test/entity_test.install diff --git a/core/modules/entity/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module similarity index 100% rename from core/modules/entity/tests/modules/entity_test/entity_test.module rename to core/modules/system/tests/modules/entity_test/entity_test.module diff --git a/core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTest.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTest.php similarity index 99% rename from core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTest.php rename to core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTest.php index 6c95f75..f88b685 100644 --- a/core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTest.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTest.php @@ -9,7 +9,7 @@ use InvalidArgumentException; -use Drupal\entity\Entity; +use Drupal\Core\Entity\Entity; /** * Defines the test entity class. diff --git a/core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php similarity index 88% rename from core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php rename to core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php index b31e5ce..53cd33a 100644 --- a/core/modules/entity/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php @@ -9,19 +9,19 @@ use PDO; -use Drupal\entity\EntityInterface; -use Drupal\entity\DatabaseStorageController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\DatabaseStorageController; /** * Defines the controller class for the test entity. * - * This extends the Drupal\entity\DatabaseStorageController class, adding + * This extends the Drupal\Core\Entity\DatabaseStorageController class, adding * required special handling for test entities. */ class EntityTestStorageController extends DatabaseStorageController { /** - * Overrides Drupal\entity\DatabaseStorageController::loadByProperties(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::loadByProperties(). */ public function loadByProperties(array $values) { $query = db_select($this->entityInfo['base table'], 'base'); @@ -58,7 +58,7 @@ public function loadByProperties(array $values) { } /** - * Overrides Drupal\entity\DatabaseStorageController::attachLoad(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::attachLoad(). */ protected function attachLoad(&$queried_entities, $load_revision = FALSE) { $data = db_select('entity_test_property_data', 'data', array('fetch' => PDO::FETCH_ASSOC)) @@ -82,7 +82,7 @@ protected function attachLoad(&$queried_entities, $load_revision = FALSE) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postSave(). */ protected function postSave(EntityInterface $entity, $update) { $default_langcode = ($language = $entity->language()) ? $language->langcode : LANGUAGE_NOT_SPECIFIED; @@ -107,7 +107,7 @@ protected function postSave(EntityInterface $entity, $update) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postDelete(). */ protected function postDelete($entities) { db_delete('entity_test_property_data') diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Term.php index 87d823a..42ad4c5 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Term.php @@ -7,8 +7,8 @@ namespace Drupal\taxonomy; -use Drupal\entity\ContentEntityInterface; -use Drupal\entity\Entity; +use Drupal\Core\Entity\ContentEntityInterface; +use Drupal\Core\Entity\Entity; /** * Defines the taxonomy term entity. @@ -92,14 +92,14 @@ class Term extends Entity implements ContentEntityInterface { public $vocabulary_machine_name; /** - * Implements Drupal\entity\EntityInterface::id(). + * Implements Drupal\Core\Entity\EntityInterface::id(). */ public function id() { return $this->tid; } /** - * Implements Drupal\entity\EntityInterface::bundle(). + * Implements Drupal\Core\Entity\EntityInterface::bundle(). */ public function bundle() { return $this->vocabulary_machine_name; diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php index dfa1c3f..c7ee415 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php @@ -7,8 +7,8 @@ namespace Drupal\taxonomy; -use Drupal\entity\EntityInterface; -use Drupal\entity\EntityFormController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityFormController; /** * Base for controller for taxonomy term edit forms. @@ -16,7 +16,7 @@ class TermFormController extends EntityFormController { /** - * Overrides Drupal\entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityFormController::form(). */ public function form(array $form, array &$form_state, EntityInterface $term) { $vocabulary = taxonomy_vocabulary_load($term->vid); @@ -123,7 +123,7 @@ public function form(array $form, array &$form_state, EntityInterface $term) { } /** - * Overrides Drupal\entity\EntityFormController::validate(). + * Overrides Drupal\Core\Entity\EntityFormController::validate(). */ public function validate(array $form, array &$form_state) { parent::validate($form, $form_state); @@ -135,7 +135,7 @@ public function validate(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityFormController::submit(). */ public function submit(array $form, array &$form_state) { $term = parent::submit($form, $form_state); @@ -152,7 +152,7 @@ public function submit(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityFormController::save(). */ public function save(array $form, array &$form_state) { $term = $this->getEntity($form_state); @@ -196,7 +196,7 @@ public function save(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::delete(). + * Overrides Drupal\Core\Entity\EntityFormController::delete(). */ public function delete(array $form, array &$form_state) { $destination = array(); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php index 961ebf0..c77cad5 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php @@ -7,8 +7,8 @@ namespace Drupal\taxonomy; -use Drupal\entity\EntityInterface; -use Drupal\entity\DatabaseStorageController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\DatabaseStorageController; /** * Defines a Controller class for taxonomy terms. @@ -16,7 +16,7 @@ class TermStorageController extends DatabaseStorageController { /** - * Overrides Drupal\entity\DatabaseStorageController::create(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::create(). * * @param array $values * An array of values to set, keyed by property name. A value for the @@ -41,7 +41,7 @@ public function create(array $values) { } /** - * Overrides Drupal\entity\DatabaseStorageController::buildQuery(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::buildQuery(). */ protected function buildQuery($ids, $revision_id = FALSE) { $query = parent::buildQuery($ids, $revision_id); @@ -55,9 +55,9 @@ protected function buildQuery($ids, $revision_id = FALSE) { } /** - * Overrides Drupal\entity\DatabaseStorageController::buildPropertyQuery(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::buildPropertyQuery(). */ - protected function buildPropertyQuery(\Drupal\entity\EntityFieldQuery $entity_query, array $values) { + protected function buildPropertyQuery(\Drupal\Core\Entity\EntityFieldQuery $entity_query, array $values) { if (isset($values['name'])) { $entity_query->propertyCondition('name', $values['name'], 'LIKE'); unset($values['name']); @@ -66,7 +66,7 @@ protected function buildPropertyQuery(\Drupal\entity\EntityFieldQuery $entity_qu } /** - * Overrides Drupal\entity\DatabaseStorageController::postDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postDelete(). */ protected function postDelete($entities) { // See if any of the term's children are about to be become orphans. @@ -97,7 +97,7 @@ protected function postDelete($entities) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postSave(). */ protected function postSave(EntityInterface $entity, $update) { if (isset($entity->parent)) { @@ -119,7 +119,7 @@ protected function postSave(EntityInterface $entity, $update) { } /** - * Overrides Drupal\entity\DatabaseStorageController::resetCache(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::resetCache(). */ public function resetCache(array $ids = NULL) { drupal_static_reset('taxonomy_term_count_nodes'); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/EfqTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/EfqTest.php index 8fb20d0..7726dbf 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/EfqTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/EfqTest.php @@ -7,7 +7,7 @@ namespace Drupal\taxonomy\Tests; -use Drupal\entity\EntityFieldQuery; +use Drupal\Core\Entity\EntityFieldQuery; /** * Tests the functionality of EntityFieldQuery for taxonomy entities. diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Vocabulary.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Vocabulary.php index 13f6bbf..e32f285 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Vocabulary.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Vocabulary.php @@ -7,7 +7,7 @@ namespace Drupal\taxonomy; -use Drupal\entity\Entity; +use Drupal\Core\Entity\Entity; /** * Defines the taxonomy vocabulary entity. @@ -62,7 +62,7 @@ class Vocabulary extends Entity { public $weight = 0; /** - * Implements Drupal\entity\EntityInterface::id(). + * Implements Drupal\Core\Entity\EntityInterface::id(). */ public function id() { return $this->vid; diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php index 667041e..bdeea4c 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyFormController.php @@ -7,8 +7,8 @@ namespace Drupal\taxonomy; -use Drupal\entity\EntityInterface; -use Drupal\entity\EntityFormController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityFormController; /** * Base form controller for vocabulary edit forms. @@ -16,7 +16,7 @@ class VocabularyFormController extends EntityFormController { /** - * Overrides Drupal\entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityFormController::form(). */ public function form(array $form, array &$form_state, EntityInterface $vocabulary) { @@ -80,7 +80,7 @@ protected function actions(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::validate(). + * Overrides Drupal\Core\Entity\EntityFormController::validate(). */ public function validate(array $form, array &$form_state) { parent::validate($form, $form_state); @@ -100,7 +100,7 @@ public function validate(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityFormController::submit(). */ public function submit(array $form, array &$form_state) { // @todo We should not be calling taxonomy_vocabulary_confirm_delete() from @@ -117,7 +117,7 @@ public function submit(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::save(). + * Overrides Drupal\Core\Entity\EntityFormController::save(). */ public function save(array $form, array &$form_state) { $vocabulary = $this->getEntity($form_state); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php index 8f4ef5b..dd5b478 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/VocabularyStorageController.php @@ -7,8 +7,8 @@ namespace Drupal\taxonomy; -use Drupal\entity\EntityInterface; -use Drupal\entity\DatabaseStorageController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\DatabaseStorageController; /** * Defines a controller class for taxonomy vocabularies. @@ -16,7 +16,7 @@ class VocabularyStorageController extends DatabaseStorageController { /** - * Overrides Drupal\entity\DatabaseStorageController::buildQuery(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::buildQuery(). */ protected function buildQuery($ids, $revision_id = FALSE) { $query = parent::buildQuery($ids, $revision_id); @@ -27,7 +27,7 @@ protected function buildQuery($ids, $revision_id = FALSE) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postSave(). */ protected function postSave(EntityInterface $entity, $update) { if (!$update) { @@ -39,7 +39,7 @@ protected function postSave(EntityInterface $entity, $update) { } /** - * Overrides Drupal\entity\DatabaseStorageController::preDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::preDelete(). */ protected function preDelete($entities) { // Only load terms without a parent, child terms will get deleted too. @@ -48,7 +48,7 @@ protected function preDelete($entities) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postDelete(). */ protected function postDelete($entities) { // Load all Taxonomy module fields and delete those which use only this @@ -79,7 +79,7 @@ protected function postDelete($entities) { } /** - * Overrides Drupal\entity\DrupalDatabaseStorageController::resetCache(). + * Overrides Drupal\Core\Entity\DrupalDatabaseStorageController::resetCache(). */ public function resetCache(array $ids = NULL) { drupal_static_reset('taxonomy_vocabulary_get_names'); diff --git a/core/modules/taxonomy/taxonomy.api.php b/core/modules/taxonomy/taxonomy.api.php index 2ef691f..78f03e6 100644 --- a/core/modules/taxonomy/taxonomy.api.php +++ b/core/modules/taxonomy/taxonomy.api.php @@ -1,6 +1,6 @@ getEntity($form_state); diff --git a/core/modules/user/lib/Drupal/user/RegisterFormController.php b/core/modules/user/lib/Drupal/user/RegisterFormController.php index 77aa58b..6e4a260 100644 --- a/core/modules/user/lib/Drupal/user/RegisterFormController.php +++ b/core/modules/user/lib/Drupal/user/RegisterFormController.php @@ -7,7 +7,7 @@ namespace Drupal\user; -use Drupal\entity\EntityInterface; +use Drupal\Core\Entity\EntityInterface; /** * Form controller for the user register forms. @@ -15,7 +15,7 @@ class RegisterFormController extends AccountFormController { /** - * Overrides Drupal\entity\EntityFormController::form(). + * Overrides Drupal\Core\Entity\EntityFormController::form(). */ public function form(array $form, array &$form_state, EntityInterface $account) { global $user; @@ -60,7 +60,7 @@ public function form(array $form, array &$form_state, EntityInterface $account) } /** - * Overrides Drupal\entity\EntityFormController::actions(). + * Overrides Drupal\Core\Entity\EntityFormController::actions(). */ protected function actions(array $form, array &$form_state) { $element = parent::actions($form, $form_state); @@ -69,7 +69,7 @@ protected function actions(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityFormController::submit(). */ public function submit(array $form, array &$form_state) { $admin = $form_state['values']['administer_users']; @@ -91,7 +91,7 @@ public function submit(array $form, array &$form_state) { } /** - * Overrides Drupal\entity\EntityFormController::submit(). + * Overrides Drupal\Core\Entity\EntityFormController::submit(). */ public function save(array $form, array &$form_state) { $account = $this->getEntity($form_state); diff --git a/core/modules/user/lib/Drupal/user/User.php b/core/modules/user/lib/Drupal/user/User.php index 74e2bf3..2217588 100644 --- a/core/modules/user/lib/Drupal/user/User.php +++ b/core/modules/user/lib/Drupal/user/User.php @@ -7,7 +7,7 @@ namespace Drupal\user; -use Drupal\entity\Entity; +use Drupal\Core\Entity\Entity; /** * Defines the user entity class. @@ -150,7 +150,7 @@ class User extends Entity { public $roles = array(); /** - * Implements Drupal\entity\EntityInterface::id(). + * Implements Drupal\Core\Entity\EntityInterface::id(). */ public function id() { return $this->uid; diff --git a/core/modules/user/lib/Drupal/user/UserStorageController.php b/core/modules/user/lib/Drupal/user/UserStorageController.php index 0cafbc6..2660300 100644 --- a/core/modules/user/lib/Drupal/user/UserStorageController.php +++ b/core/modules/user/lib/Drupal/user/UserStorageController.php @@ -7,20 +7,20 @@ namespace Drupal\user; -use Drupal\entity\EntityInterface; -use Drupal\entity\EntityMalformedException; -use Drupal\entity\DatabaseStorageController; +use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityMalformedException; +use Drupal\Core\Entity\DatabaseStorageController; /** * Controller class for users. * - * This extends the Drupal\entity\DatabaseStorageController class, adding + * This extends the Drupal\Core\Entity\DatabaseStorageController class, adding * required special handling for user objects. */ class UserStorageController extends DatabaseStorageController { /** - * Overrides Drupal\entity\DatabaseStorageController::attachLoad(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::attachLoad(). */ function attachLoad(&$queried_users, $load_revision = FALSE) { // Build an array of user picture IDs so that these can be fetched later. @@ -60,7 +60,7 @@ function attachLoad(&$queried_users, $load_revision = FALSE) { } /** - * Overrides Drupal\entity\DatabaseStorageController::create(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::create(). */ public function create(array $values) { if (!isset($values['created'])) { @@ -73,7 +73,7 @@ public function create(array $values) { } /** - * Overrides Drupal\entity\DatabaseStorageController::save(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::save(). */ public function save(EntityInterface $entity) { if (empty($entity->uid)) { @@ -84,7 +84,7 @@ public function save(EntityInterface $entity) { } /** - * Overrides Drupal\entity\DatabaseStorageController::preSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::preSave(). */ protected function preSave(EntityInterface $entity) { // Update the user password if it has changed. @@ -158,7 +158,7 @@ protected function preSave(EntityInterface $entity) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postSave(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postSave(). */ protected function postSave(EntityInterface $entity, $update) { @@ -223,7 +223,7 @@ protected function postSave(EntityInterface $entity, $update) { } /** - * Overrides Drupal\entity\DatabaseStorageController::postDelete(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::postDelete(). */ protected function postDelete($entities) { db_delete('users_roles') diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php index 98b9887..660c06b 100644 --- a/core/modules/user/user.api.php +++ b/core/modules/user/user.api.php @@ -1,6 +1,6 @@