diff --git a/core/includes/entity.inc b/core/includes/entity.inc index 7822d7a..772e0ef 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -388,7 +388,7 @@ function entity_delete_multiple($entity_type, array $ids) { function entity_create($entity_type, array $values) { return Drupal::entityManager() ->getStorageController($entity_type) - ->create($values); + ->createEntity($values); } /** diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 915f809..10c4942 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -2894,7 +2894,7 @@ function _menu_navigation_links_rebuild($menu) { $router_item['updated'] = $existing_item->updated; // Convert the existing item to a typed object. - $existing_item = $menu_link_controller->create(get_object_vars($existing_item)); + $existing_item = $menu_link_controller->createEntity(get_object_vars($existing_item)); } else { $existing_item = NULL; diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index 8cfc060..6f58ce1 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -103,7 +103,7 @@ public function __construct($entity_type, array $entity_info, ConfigFactory $con /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, @@ -307,9 +307,9 @@ protected function attachLoad(&$queried_entities, $revision_id = FALSE) { } /** - * Implements Drupal\Core\Entity\EntityStorageControllerInterface::create(). + * Implements Drupal\Core\Entity\EntityStorageControllerInterface::createEntity(). */ - public function create(array $values) { + public function createEntity(array $values) { $class = $this->entityInfo['class']; $class::preCreate($this, $values); @@ -481,7 +481,7 @@ public function getQueryServicename() { * A configuration object containing the old configuration data. */ public function importCreate($name, Config $new_config, Config $old_config) { - $entity = $this->create($new_config->get()); + $entity = $this->createEntity($new_config->get()); $entity->save(); return TRUE; } diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php index bbf1ae0..45524e0 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php @@ -61,7 +61,7 @@ class DatabaseStorageController extends EntityStorageControllerBase { /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, @@ -360,9 +360,9 @@ protected function attachLoad(&$queried_entities, $load_revision = FALSE) { } /** - * Implements \Drupal\Core\Entity\EntityStorageControllerInterface::create(). + * Implements \Drupal\Core\Entity\EntityStorageControllerInterface::createEntity(). */ - public function create(array $values) { + public function createEntity(array $values) { $entity_class = $this->entityInfo['class']; $entity_class::preCreate($this, $values); diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php index ad361d7..240f5cb 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageControllerNG.php @@ -71,7 +71,7 @@ public function __construct($entity_type, array $entity_info, Connection $databa } /** - * Overrides DatabaseStorageController::create(). + * Overrides DatabaseStorageController::createEntity(). * * @param array $values * An array of values to set, keyed by field name. The value has to be @@ -96,7 +96,7 @@ public function __construct($entity_type, array $entity_info, Connection $databa * @return \Drupal\Core\Entity\EntityInterface * A new entity object. */ - public function create(array $values) { + public function createEntity(array $values) { $entity_class = $this->entityClass; $entity_class::preCreate($this, $values); diff --git a/core/lib/Drupal/Core/Entity/EntityControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityControllerInterface.php index 79232c1..9d2e466 100644 --- a/core/lib/Drupal/Core/Entity/EntityControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityControllerInterface.php @@ -38,6 +38,6 @@ * @return static * A new instance of the entity controller. */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info); + public static function create(ContainerInterface $container, $entity_type, array $entity_info); } diff --git a/core/lib/Drupal/Core/Entity/EntityListController.php b/core/lib/Drupal/Core/Entity/EntityListController.php index 09cc203..3fc5ea8 100644 --- a/core/lib/Drupal/Core/Entity/EntityListController.php +++ b/core/lib/Drupal/Core/Entity/EntityListController.php @@ -49,7 +49,7 @@ class EntityListController implements EntityListControllerInterface, EntityContr /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index a662259..8b11eda 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -206,7 +206,7 @@ public function getListController($entity_type) { if (!isset($this->controllers['listing'][$entity_type])) { $class = $this->getControllerClass($entity_type, 'list'); if (in_array('Drupal\Core\Entity\EntityControllerInterface', class_implements($class))) { - $this->controllers['listing'][$entity_type] = $class::createInstance($this->container, $entity_type, $this->getDefinition($entity_type)); + $this->controllers['listing'][$entity_type] = $class::create($this->container, $entity_type, $this->getDefinition($entity_type)); } else { $this->controllers['listing'][$entity_type] = new $class($entity_type, $this->getStorageController($entity_type)); @@ -230,7 +230,7 @@ public function getFormController($entity_type, $operation) { if (!isset($this->controllers['form'][$operation][$entity_type])) { $class = $this->getControllerClass($entity_type, 'form', $operation); if (in_array('Drupal\Core\Entity\EntityControllerInterface', class_implements($class))) { - $this->controllers['form'][$operation][$entity_type] = $class::createInstance($this->container, $entity_type, $this->getDefinition($entity_type)); + $this->controllers['form'][$operation][$entity_type] = $class::create($this->container, $entity_type, $this->getDefinition($entity_type)); } else { $this->controllers['form'][$operation][$entity_type] = new $class($this->container->get('module_handler')); @@ -281,7 +281,7 @@ protected function getController($entity_type, $controller_type) { if (!isset($this->controllers[$controller_type][$entity_type])) { $class = $this->getControllerClass($entity_type, $controller_type); if (in_array('Drupal\Core\Entity\EntityControllerInterface', class_implements($class))) { - $this->controllers[$controller_type][$entity_type] = $class::createInstance($this->container, $entity_type, $this->getDefinition($entity_type)); + $this->controllers[$controller_type][$entity_type] = $class::create($this->container, $entity_type, $this->getDefinition($entity_type)); } else { $this->controllers[$controller_type][$entity_type] = new $class($entity_type); diff --git a/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php index 24447fd..0511a68 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php @@ -108,7 +108,7 @@ public function loadByProperties(array $values = array()); * @return \Drupal\Core\Entity\EntityInterface * A new entity object. */ - public function create(array $values); + public function createEntity(array $values); /** * Deletes permanently saved entities. diff --git a/core/modules/action/lib/Drupal/action/ActionAddFormController.php b/core/modules/action/lib/Drupal/action/ActionAddFormController.php index 56d7bbf..2b42a06 100644 --- a/core/modules/action/lib/Drupal/action/ActionAddFormController.php +++ b/core/modules/action/lib/Drupal/action/ActionAddFormController.php @@ -45,7 +45,7 @@ public function __construct(ModuleHandlerInterface $module_handler, EntityStorag /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity')->getStorageController($entity_type), diff --git a/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php b/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php index e9df397..43db362 100644 --- a/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php +++ b/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php @@ -50,7 +50,7 @@ public function __construct(ModuleHandlerInterface $module_handler, EntityStorag /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity')->getStorageController($entity_type) diff --git a/core/modules/action/lib/Drupal/action/ActionListController.php b/core/modules/action/lib/Drupal/action/ActionListController.php index f3d5848..d030d10 100644 --- a/core/modules/action/lib/Drupal/action/ActionListController.php +++ b/core/modules/action/lib/Drupal/action/ActionListController.php @@ -57,7 +57,7 @@ public function __construct($entity_type, array $entity_info, EntityStorageContr /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php index 4b7c220..6a5b4f8 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Form/CustomBlockTypeDeleteForm.php @@ -42,7 +42,7 @@ public function __construct(ModuleHandlerInterface $module_handler, QueryFactory /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('entity.query') diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php index 6041b2c..687603b 100644 --- a/core/modules/block/lib/Drupal/block/BlockFormController.php +++ b/core/modules/block/lib/Drupal/block/BlockFormController.php @@ -54,7 +54,7 @@ public function __construct(ModuleHandlerInterface $module_handler, EntityManage /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity'), diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListController.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListController.php index b0f8f6e..56a83cb 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListController.php +++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListController.php @@ -49,7 +49,7 @@ public function __construct($entity_type, array $entity_info, EntityStorageContr /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { $entity_manager = $container->get('plugin.manager.entity'); return new static( $entity_type, diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php index ad67f5a..6688b0f 100644 --- a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php +++ b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php @@ -51,7 +51,7 @@ public function __construct(ModuleHandlerInterface $module_handler, QueryFactory /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('entity.query'), diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php index 787432a..84ffa48 100644 --- a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php +++ b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeFormBase.php @@ -52,7 +52,7 @@ public function __construct(ModuleHandlerInterface $module_handler, QueryFactory /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('entity.query'), diff --git a/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php b/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php index f9ce249..4e65c9f 100644 --- a/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php +++ b/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php @@ -76,7 +76,7 @@ public function __construct($entity_type, array $entity_info, ConfigFactory $con /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/field/lib/Drupal/field/FieldStorageController.php b/core/modules/field/lib/Drupal/field/FieldStorageController.php index 41efe60..0246cfd 100644 --- a/core/modules/field/lib/Drupal/field/FieldStorageController.php +++ b/core/modules/field/lib/Drupal/field/FieldStorageController.php @@ -72,7 +72,7 @@ public function __construct($entity_type, array $entity_info, ConfigFactory $con /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/field_ui/lib/Drupal/field_ui/FieldListController.php b/core/modules/field_ui/lib/Drupal/field_ui/FieldListController.php index 514e966..2e041dc 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/FieldListController.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/FieldListController.php @@ -84,7 +84,7 @@ public function __construct($entity_type, array $entity_info, EntityManager $ent /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php index e53eec9..cef3173 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/Form/FieldDeleteForm.php @@ -41,7 +41,7 @@ public function __construct(ModuleHandlerInterface $module_handler, EntityManage /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity') diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php index e715e4a..bbb2f3c 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php @@ -53,7 +53,7 @@ public function __construct(ModuleHandlerInterface $module_handler, ConfigFactor /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('config.factory'), diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php index c8df5e6..9da1ab8 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php @@ -51,7 +51,7 @@ public function __construct($entity_type, array $entity_info, EntityStorageContr /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php b/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php index b517747..2722f6c 100644 --- a/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php +++ b/core/modules/forum/lib/Drupal/forum/Form/ForumFormController.php @@ -78,7 +78,7 @@ public function __construct(ModuleHandlerInterface $module_handler, ConfigFactor /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('config.factory'), diff --git a/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php b/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php index 0625cdd..e4b3950 100644 --- a/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php +++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleEditForm.php @@ -48,7 +48,7 @@ public function __construct(ModuleHandlerInterface $module_handler, EntityStorag /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity')->getStorageController($entity_type), diff --git a/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php b/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php index a050434..279bd60 100644 --- a/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php +++ b/core/modules/image/lib/Drupal/image/Form/ImageStyleFormBase.php @@ -52,7 +52,7 @@ public function __construct(ModuleHandlerInterface $module_handler, EntityStorag /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity')->getStorageController($entity_type), diff --git a/core/modules/image/lib/Drupal/image/ImageStyleListController.php b/core/modules/image/lib/Drupal/image/ImageStyleListController.php index c4b7e64..70acb7a 100644 --- a/core/modules/image/lib/Drupal/image/ImageStyleListController.php +++ b/core/modules/image/lib/Drupal/image/ImageStyleListController.php @@ -60,7 +60,7 @@ public function __construct($entity_type, array $entity_info, EntityStorageContr /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php index febf8b9..8570995 100644 --- a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php +++ b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php @@ -52,7 +52,7 @@ public function __construct(ModuleHandlerInterface $module_handler, EntityStorag /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity')->getStorageController('menu_link'), diff --git a/core/modules/menu/lib/Drupal/menu/MenuFormController.php b/core/modules/menu/lib/Drupal/menu/MenuFormController.php index 6573865..22b7556 100644 --- a/core/modules/menu/lib/Drupal/menu/MenuFormController.php +++ b/core/modules/menu/lib/Drupal/menu/MenuFormController.php @@ -62,7 +62,7 @@ public function __construct(ModuleHandlerInterface $module_handler, QueryFactory /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('entity.query'), diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php index 9d58de9..e7c8855 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkFormController.php @@ -60,7 +60,7 @@ public function __construct(ModuleHandlerInterface $module_handler, MenuLinkStor /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity')->getStorageController('menu_link'), diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php index 43d54ce..ed80b3d 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php @@ -68,19 +68,19 @@ public function __construct($entity_type, array $entity_info, Connection $databa /** * {@inheritdoc} */ - public function create(array $values) { + public function createEntity(array $values) { // The bundle of menu links being the menu name is not enforced but is the // default behavior if no bundle is set. if (!isset($values['bundle']) && isset($values['menu_name'])) { $values['bundle'] = $values['menu_name']; } - return parent::create($values); + return parent::createEntity($values); } /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php b/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php index 3ff0fdf..dd7bdd4 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php @@ -348,7 +348,7 @@ public static function buildFromRouterItem(array $item) { 'options' => empty($item['description']) ? array() : array('attributes' => array('title' => $item['description'])), ); return \Drupal::entityManager() - ->getStorageController('menu_link')->create($item); + ->getStorageController('menu_link')->createEntity($item); } /** diff --git a/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php b/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php index 5a3fdb0..e60687e 100644 --- a/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php +++ b/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php @@ -54,7 +54,7 @@ public function __construct(ModuleHandlerInterface $module_handler, PathBasedGen /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('url_generator'), diff --git a/core/modules/node/lib/Drupal/node/Form/NodeTypeDeleteConfirm.php b/core/modules/node/lib/Drupal/node/Form/NodeTypeDeleteConfirm.php index d159b3d..0179867 100644 --- a/core/modules/node/lib/Drupal/node/Form/NodeTypeDeleteConfirm.php +++ b/core/modules/node/lib/Drupal/node/Form/NodeTypeDeleteConfirm.php @@ -42,7 +42,7 @@ public function __construct(ModuleHandlerInterface $module_handler, Connection $ /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('database') diff --git a/core/modules/node/lib/Drupal/node/NodeAccessController.php b/core/modules/node/lib/Drupal/node/NodeAccessController.php index 2556d76..59812ef 100644 --- a/core/modules/node/lib/Drupal/node/NodeAccessController.php +++ b/core/modules/node/lib/Drupal/node/NodeAccessController.php @@ -57,7 +57,7 @@ public function __construct($entity_type, NodeGrantDatabaseStorageInterface $gra /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $container->get('node.grant_storage'), diff --git a/core/modules/node/lib/Drupal/node/NodeStorageController.php b/core/modules/node/lib/Drupal/node/NodeStorageController.php index 1a874fe..35559b6 100644 --- a/core/modules/node/lib/Drupal/node/NodeStorageController.php +++ b/core/modules/node/lib/Drupal/node/NodeStorageController.php @@ -19,14 +19,14 @@ class NodeStorageController extends DatabaseStorageControllerNG { /** - * Overrides Drupal\Core\Entity\DatabaseStorageController::create(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::createEntity(). */ - public function create(array $values) { + public function createEntity(array $values) { // @todo Handle this through property defaults. if (empty($values['created'])) { $values['created'] = REQUEST_TIME; } - return parent::create($values)->getBCEntity(); + return parent::createEntity($values)->getBCEntity(); } /** diff --git a/core/modules/node/lib/Drupal/node/NodeTypeListController.php b/core/modules/node/lib/Drupal/node/NodeTypeListController.php index d6be67d..113f80c 100644 --- a/core/modules/node/lib/Drupal/node/NodeTypeListController.php +++ b/core/modules/node/lib/Drupal/node/NodeTypeListController.php @@ -49,7 +49,7 @@ public function __construct($entity_type, array $entity_info, EntityStorageContr /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php b/core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php index a12dbd8..ffaebff 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/Form/ShortcutSetDeleteForm.php @@ -46,7 +46,7 @@ public function __construct(ModuleHandlerInterface $module_handler, Connection $ /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('database'), diff --git a/core/modules/system/lib/Drupal/system/DateFormatListController.php b/core/modules/system/lib/Drupal/system/DateFormatListController.php index e08c825..80f4e37 100644 --- a/core/modules/system/lib/Drupal/system/DateFormatListController.php +++ b/core/modules/system/lib/Drupal/system/DateFormatListController.php @@ -50,7 +50,7 @@ public function __construct($entity_type, array $entity_info, EntityStorageContr /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php b/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php index 3d3dfc7..8544bf3 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatDeleteForm.php @@ -43,7 +43,7 @@ public function __construct(ModuleHandlerInterface $module_handler, Date $date_s /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('date') diff --git a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php index d6aac67..3e76857 100644 --- a/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php +++ b/core/modules/system/lib/Drupal/system/Form/DateFormatFormBase.php @@ -66,7 +66,7 @@ function __construct(ModuleHandlerInterface $module_handler, QueryFactory $query /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('entity.query'), diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php index be93b68..614ec19 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php @@ -20,11 +20,11 @@ class EntityTestStorageController extends DatabaseStorageControllerNG { /** * {@inheritdoc} */ - public function create(array $values) { + public function createEntity(array $values) { if (empty($values['type'])) { $values['type'] = $this->entityType; } - return parent::create($values); + return parent::createEntity($values); } /** diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php index fe8dffb..648356b 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/TermDeleteForm.php @@ -40,7 +40,7 @@ public function __construct(ModuleHandlerInterface $module_handler, VocabularySt /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.entity')->getStorageController('taxonomy_vocabulary') diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php index 4366cb2..d0bfabd 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Form/VocabularyResetForm.php @@ -38,7 +38,7 @@ public function __construct(ModuleHandlerInterface $module_handler, Connection $ /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('database') diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php index cb0821c..3950c68 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorageController.php @@ -17,18 +17,18 @@ class TermStorageController extends DatabaseStorageControllerNG implements TermStorageControllerInterface { /** - * Overrides Drupal\Core\Entity\DatabaseStorageController::create(). + * Overrides Drupal\Core\Entity\DatabaseStorageController::createEntity(). * * @param array $values * An array of values to set, keyed by property name. A value for the * vocabulary ID ('vid') is required. */ - public function create(array $values) { + public function createEntity(array $values) { // Save new terms with no parents by default. if (empty($values['parent'])) { $values['parent'] = array(0); } - $entity = parent::create($values); + $entity = parent::createEntity($values); return $entity; } diff --git a/core/modules/user/lib/Drupal/user/UserStorageController.php b/core/modules/user/lib/Drupal/user/UserStorageController.php index a441023..2b96c11 100644 --- a/core/modules/user/lib/Drupal/user/UserStorageController.php +++ b/core/modules/user/lib/Drupal/user/UserStorageController.php @@ -61,7 +61,7 @@ public function __construct($entity_type, $entity_info, Connection $database, Pa /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $entity_info, diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php index a161caf..b6bbca4 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php @@ -49,7 +49,7 @@ public function __construct(EntityManager $entity_manager, TempStoreFactory $tem /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('plugin.manager.entity'), $container->get('user.tempstore') diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php index 4ad9376..c234d8d 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php @@ -43,7 +43,7 @@ public function __construct(ModuleHandlerInterface $module_handler, ViewsPluginM /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('plugin.manager.views.wizard') diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php index 6048d35..f1fc7f8 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php @@ -57,7 +57,7 @@ public function __construct(ModuleHandlerInterface $module_handler, TempStoreFac /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) { return new static( $container->get('module_handler'), $container->get('user.tempstore'), diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewListController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewListController.php index 8fe0ce7..cbc378a 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewListController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewListController.php @@ -31,7 +31,7 @@ class ViewListController extends ConfigEntityListController implements EntityCon /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $entity_type, $container->get('plugin.manager.entity')->getStorageController($entity_type), diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php index de4bd60..f24f9e7 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewPreviewFormController.php @@ -41,7 +41,7 @@ public function __construct(ModuleHandlerInterface $module_handler, TempStoreFac /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) { + public static function create(ContainerInterface $container, $entity_type, array $entity_info) { return new static( $container->get('module_handler'), $container->get('user.tempstore')