comparison core/lib/Drupal/Core/Entity/EntityManager.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
29 * instead. 29 * instead.
30 * 30 *
31 * @see https://www.drupal.org/node/2549139 31 * @see https://www.drupal.org/node/2549139
32 */ 32 */
33 public function clearCachedDefinitions() { 33 public function clearCachedDefinitions() {
34 @trigger_error('EntityManagerInterface::clearCachedDefinitions() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeManagerInterface::clearCachedDefinitions() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
34 $this->container->get('entity_type.manager')->clearCachedDefinitions(); 35 $this->container->get('entity_type.manager')->clearCachedDefinitions();
35 36
36 // @todo None of these are plugin managers, and they should not co-opt 37 // @todo None of these are plugin managers, and they should not co-opt
37 // this method for managing its caches. Remove in 38 // this method for managing its caches. Remove in
38 // https://www.drupal.org/node/2549143. 39 // https://www.drupal.org/node/2549143.
61 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::hasHandler() 62 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::hasHandler()
62 * instead. 63 * instead.
63 * 64 *
64 * @see https://www.drupal.org/node/2549139 65 * @see https://www.drupal.org/node/2549139
65 */ 66 */
66 public function hasHandler($entity_type, $handler_type) { 67 public function hasHandler($entity_type_id, $handler_type) {
67 return $this->container->get('entity_type.manager')->hasHandler($entity_type, $handler_type); 68 return $this->container->get('entity_type.manager')->hasHandler($entity_type_id, $handler_type);
68 } 69 }
69 70
70 /** 71 /**
71 * {@inheritdoc} 72 * {@inheritdoc}
72 * 73 *
73 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 74 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
74 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() instead. 75 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() instead.
75 * 76 *
76 * @see https://www.drupal.org/node/2549139 77 * @see https://www.drupal.org/node/2549139
77 */ 78 */
78 public function getStorage($entity_type) { 79 public function getStorage($entity_type_id) {
79 return $this->container->get('entity_type.manager')->getStorage($entity_type); 80 return $this->container->get('entity_type.manager')->getStorage($entity_type_id);
80 } 81 }
81 82
82 /** 83 /**
83 * {@inheritdoc} 84 * {@inheritdoc}
84 * 85 *
86 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getListBuilder() 87 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getListBuilder()
87 * instead. 88 * instead.
88 * 89 *
89 * @see https://www.drupal.org/node/2549139 90 * @see https://www.drupal.org/node/2549139
90 */ 91 */
91 public function getListBuilder($entity_type) { 92 public function getListBuilder($entity_type_id) {
92 return $this->container->get('entity_type.manager')->getListBuilder($entity_type); 93 return $this->container->get('entity_type.manager')->getListBuilder($entity_type_id);
93 } 94 }
94 95
95 /** 96 /**
96 * {@inheritdoc} 97 * {@inheritdoc}
97 * 98 *
99 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getFormObject() 100 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getFormObject()
100 * instead. 101 * instead.
101 * 102 *
102 * @see https://www.drupal.org/node/2549139 103 * @see https://www.drupal.org/node/2549139
103 */ 104 */
104 public function getFormObject($entity_type, $operation) { 105 public function getFormObject($entity_type_id, $operation) {
105 return $this->container->get('entity_type.manager')->getFormObject($entity_type, $operation); 106 return $this->container->get('entity_type.manager')->getFormObject($entity_type_id, $operation);
106 } 107 }
107 108
108 /** 109 /**
109 * {@inheritdoc} 110 * {@inheritdoc}
110 * 111 *
112 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getRouteProviders() 113 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getRouteProviders()
113 * instead. 114 * instead.
114 * 115 *
115 * @see https://www.drupal.org/node/2549139 116 * @see https://www.drupal.org/node/2549139
116 */ 117 */
117 public function getRouteProviders($entity_type) { 118 public function getRouteProviders($entity_type_id) {
118 return $this->container->get('entity_type.manager')->getRouteProviders($entity_type); 119 return $this->container->get('entity_type.manager')->getRouteProviders($entity_type_id);
119 } 120 }
120 121
121 /** 122 /**
122 * {@inheritdoc} 123 * {@inheritdoc}
123 * 124 *
125 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getViewBuilder() 126 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getViewBuilder()
126 * instead. 127 * instead.
127 * 128 *
128 * @see https://www.drupal.org/node/2549139 129 * @see https://www.drupal.org/node/2549139
129 */ 130 */
130 public function getViewBuilder($entity_type) { 131 public function getViewBuilder($entity_type_id) {
131 return $this->container->get('entity_type.manager')->getViewBuilder($entity_type); 132 return $this->container->get('entity_type.manager')->getViewBuilder($entity_type_id);
132 } 133 }
133 134
134 /** 135 /**
135 * {@inheritdoc} 136 * {@inheritdoc}
136 * 137 *
138 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getAccessControlHandler() 139 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getAccessControlHandler()
139 * instead. 140 * instead.
140 * 141 *
141 * @see https://www.drupal.org/node/2549139 142 * @see https://www.drupal.org/node/2549139
142 */ 143 */
143 public function getAccessControlHandler($entity_type) { 144 public function getAccessControlHandler($entity_type_id) {
144 return $this->container->get('entity_type.manager')->getAccessControlHandler($entity_type); 145 return $this->container->get('entity_type.manager')->getAccessControlHandler($entity_type_id);
145 } 146 }
146 147
147 /** 148 /**
148 * {@inheritdoc} 149 * {@inheritdoc}
149 * 150 *
150 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 151 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
151 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getHandler() instead. 152 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getHandler() instead.
152 * 153 *
153 * @see https://www.drupal.org/node/2549139 154 * @see https://www.drupal.org/node/2549139
154 */ 155 */
155 public function getHandler($entity_type, $handler_type) { 156 public function getHandler($entity_type_id, $handler_type) {
156 return $this->container->get('entity_type.manager')->getHandler($entity_type, $handler_type); 157 return $this->container->get('entity_type.manager')->getHandler($entity_type_id, $handler_type);
157 } 158 }
158 159
159 /** 160 /**
160 * {@inheritdoc} 161 * {@inheritdoc}
161 * 162 *
210 211
211 /** 212 /**
212 * {@inheritdoc} 213 * {@inheritdoc}
213 * 214 *
214 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 215 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
216 * Use \Drupal\Core\Entity\EntityFieldManagerInterface::getActiveFieldStorageDefinitions()
217 * instead.
218 *
219 * @see https://www.drupal.org/node/3040966
220 */
221 public function getActiveFieldStorageDefinitions($entity_type_id) {
222 @trigger_error('EntityManagerInterface::getActiveFieldStorageDefinitions() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityFieldManagerInterface::getActiveFieldStorageDefinitions() instead. See https://www.drupal.org/node/3040966.', E_USER_DEPRECATED);
223 return $this->container->get('entity_field.manager')->getActiveFieldStorageDefinitions($entity_type_id);
224 }
225
226 /**
227 * {@inheritdoc}
228 *
229 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
215 * Use \Drupal\Core\Entity\EntityFieldManagerInterface::setFieldMap() 230 * Use \Drupal\Core\Entity\EntityFieldManagerInterface::setFieldMap()
216 * instead. 231 * instead.
217 * 232 *
218 * @see https://www.drupal.org/node/2549139 233 * @see https://www.drupal.org/node/2549139
219 */ 234 */
255 * instead. 270 * instead.
256 * 271 *
257 * @see https://www.drupal.org/node/2549139 272 * @see https://www.drupal.org/node/2549139
258 */ 273 */
259 public function onFieldDefinitionCreate(FieldDefinitionInterface $field_definition) { 274 public function onFieldDefinitionCreate(FieldDefinitionInterface $field_definition) {
275 @trigger_error('EntityManagerInterface::onFieldDefinitionCreate() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Field\FieldDefinitionListenerInterface::onFieldDefinitionCreate() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
260 $this->container->get('field_definition.listener')->onFieldDefinitionCreate($field_definition); 276 $this->container->get('field_definition.listener')->onFieldDefinitionCreate($field_definition);
261 } 277 }
262 278
263 /** 279 /**
264 * {@inheritdoc} 280 * {@inheritdoc}
268 * instead. 284 * instead.
269 * 285 *
270 * @see https://www.drupal.org/node/2549139 286 * @see https://www.drupal.org/node/2549139
271 */ 287 */
272 public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original) { 288 public function onFieldDefinitionUpdate(FieldDefinitionInterface $field_definition, FieldDefinitionInterface $original) {
289 @trigger_error('EntityManagerInterface::onFieldDefinitionUpdate() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Field\FieldDefinitionListenerInterface::onFieldDefinitionUpdate() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
273 $this->container->get('field_definition.listener')->onFieldDefinitionUpdate($field_definition, $original); 290 $this->container->get('field_definition.listener')->onFieldDefinitionUpdate($field_definition, $original);
274 } 291 }
275 292
276 /** 293 /**
277 * {@inheritdoc} 294 * {@inheritdoc}
281 * instead. 298 * instead.
282 * 299 *
283 * @see https://www.drupal.org/node/2549139 300 * @see https://www.drupal.org/node/2549139
284 */ 301 */
285 public function onFieldDefinitionDelete(FieldDefinitionInterface $field_definition) { 302 public function onFieldDefinitionDelete(FieldDefinitionInterface $field_definition) {
303 @trigger_error('EntityManagerInterface::onFieldDefinitionDelete() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Field\FieldDefinitionListenerInterface::onFieldDefinitionDelete() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
286 $this->container->get('field_definition.listener')->onFieldDefinitionDelete($field_definition); 304 $this->container->get('field_definition.listener')->onFieldDefinitionDelete($field_definition);
287 } 305 }
288 306
289 /** 307 /**
290 * {@inheritdoc} 308 * {@inheritdoc}
300 } 318 }
301 319
302 /** 320 /**
303 * {@inheritdoc} 321 * {@inheritdoc}
304 * 322 *
305 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 323 * @deprecated in drupal:8.0.0, will be removed before drupal:9.0.0.
306 * Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::clearCachedBundles() 324 * Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::clearCachedBundles()
307 * instead. 325 * instead.
308 * 326 *
309 * @see https://www.drupal.org/node/2549139 327 * @see https://www.drupal.org/node/2549139
310 */ 328 */
311 public function clearCachedBundles() { 329 public function clearCachedBundles() {
330 @trigger_error('EntityManagerInterface::clearCachedBundles() is deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::clearCachedBundles() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
312 $this->container->get('entity_type.bundle.info')->clearCachedBundles(); 331 $this->container->get('entity_type.bundle.info')->clearCachedBundles();
313 } 332 }
314 333
315 /** 334 /**
316 * {@inheritdoc} 335 * {@inheritdoc}
317 * 336 *
318 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 337 * @deprecated in drupal:8.0.0, will be removed before drupal:9.0.0.
319 * Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo() 338 * Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo()
320 * instead. 339 * instead.
321 * 340 *
322 * @see https://www.drupal.org/node/2549139 341 * @see https://www.drupal.org/node/2549139
323 */ 342 */
324 public function getBundleInfo($entity_type_id) { 343 public function getBundleInfo($entity_type_id) {
344 @trigger_error('EntityManagerInterface::getBundleInfo() is deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
325 return $this->container->get('entity_type.bundle.info')->getBundleInfo($entity_type_id); 345 return $this->container->get('entity_type.bundle.info')->getBundleInfo($entity_type_id);
326 } 346 }
327 347
328 /** 348 /**
329 * {@inheritdoc} 349 * {@inheritdoc}
330 * 350 *
331 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 351 * @deprecated in drupal:8.0.0, will be removed before drupal:9.0.0.
332 * Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getAllBundleInfo() 352 * Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getAllBundleInfo()
333 * instead. 353 * instead.
334 * 354 *
335 * @see https://www.drupal.org/node/2549139 355 * @see https://www.drupal.org/node/2549139
336 */ 356 */
337 public function getAllBundleInfo() { 357 public function getAllBundleInfo() {
358 @trigger_error('EntityManagerInterface::getAllBundleInfo() is deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getAllBundleInfo() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
338 return $this->container->get('entity_type.bundle.info')->getAllBundleInfo(); 359 return $this->container->get('entity_type.bundle.info')->getAllBundleInfo();
339 } 360 }
340 361
341 /** 362 /**
342 * {@inheritdoc} 363 * {@inheritdoc}
353 * instead. 374 * instead.
354 * 375 *
355 * @see https://www.drupal.org/node/2549139 376 * @see https://www.drupal.org/node/2549139
356 */ 377 */
357 public function getEntityTypeLabels($group = FALSE) { 378 public function getEntityTypeLabels($group = FALSE) {
379 @trigger_error('EntityManagerInterface::getEntityTypeLabels() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeRepositoryInterface::getEntityTypeLabels() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
358 return $this->container->get('entity_type.repository')->getEntityTypeLabels($group); 380 return $this->container->get('entity_type.repository')->getEntityTypeLabels($group);
359 } 381 }
360 382
361 /** 383 /**
362 * {@inheritdoc} 384 * {@inheritdoc}
366 * instead. 388 * instead.
367 * 389 *
368 * @see https://www.drupal.org/node/2549139 390 * @see https://www.drupal.org/node/2549139
369 */ 391 */
370 public function getTranslationFromContext(EntityInterface $entity, $langcode = NULL, $context = []) { 392 public function getTranslationFromContext(EntityInterface $entity, $langcode = NULL, $context = []) {
393 @trigger_error('EntityManagerInterface::getTranslationFromContext() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityRepository::getTranslationFromContext() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
371 return $this->container->get('entity.repository')->getTranslationFromContext($entity, $langcode, $context); 394 return $this->container->get('entity.repository')->getTranslationFromContext($entity, $langcode, $context);
372 } 395 }
373 396
374 /** 397 /**
375 * {@inheritdoc} 398 * {@inheritdoc}
376 * 399 *
400 * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0.
401 * Use \Drupal\Core\Entity\EntityRepositoryInterface::getActive() instead.
402 *
403 * @see https://www.drupal.org/node/2549139
404 */
405 public function getActive($entity_type_id, $entity_id, array $contexts = NULL) {
406 @trigger_error('EntityManagerInterface::getActive() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityRepositoryInterface::getActive() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
407 return $this->container->get('entity.repository')->getActive($entity_type_id, $entity_id, $contexts);
408 }
409
410 /**
411 * {@inheritdoc}
412 *
413 * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0.
414 * Use \Drupal\Core\Entity\EntityRepositoryInterface::getActiveMultiple()
415 * instead.
416 *
417 * @see https://www.drupal.org/node/2549139
418 */
419 public function getActiveMultiple($entity_type_id, array $entity_ids, array $contexts = NULL) {
420 @trigger_error('EntityManagerInterface::getActiveMultiple() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityRepositoryInterface::getActiveMultiple() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
421 return $this->container->get('entity.repository')->getActiveMultiple($entity_type_id, $entity_ids, $contexts);
422 }
423
424 /**
425 * {@inheritdoc}
426 *
427 * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0.
428 * Use \Drupal\Core\Entity\EntityRepositoryInterface::getCanonical()
429 * instead.
430 *
431 * @see https://www.drupal.org/node/2549139
432 */
433 public function getCanonical($entity_type_id, $entity_id, array $contexts = NULL) {
434 @trigger_error('EntityManagerInterface::getCanonical() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityRepositoryInterface::getCanonical() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
435 return $this->container->get('entity.repository')->getCanonical($entity_type_id, $entity_id, $contexts);
436 }
437
438 /**
439 * {@inheritdoc}
440 *
441 * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0.
442 * Use \Drupal\Core\Entity\EntityRepositoryInterface::getCanonicalMultiple()
443 * instead.
444 *
445 * @see https://www.drupal.org/node/2549139
446 */
447 public function getCanonicalMultiple($entity_type_id, array $entity_ids, array $contexts = NULL) {
448 @trigger_error('EntityManagerInterface::getCanonicalMultiple() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityRepositoryInterface::getCanonicalMultiple() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
449 return $this->container->get('entity.repository')->getCanonicalMultiple($entity_type_id, $entity_ids, $contexts);
450 }
451
452 /**
453 * {@inheritdoc}
454 *
377 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 455 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
378 * Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllViewModes() 456 * Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllViewModes()
379 * instead. 457 * instead.
380 * 458 *
381 * @see https://www.drupal.org/node/2549139 459 * @see https://www.drupal.org/node/2549139
382 */ 460 */
383 public function getAllViewModes() { 461 public function getAllViewModes() {
462 @trigger_error('EntityManagerInterface::getAllViewModes() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllViewModes() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
384 return $this->container->get('entity_display.repository')->getAllViewModes(); 463 return $this->container->get('entity_display.repository')->getAllViewModes();
385 } 464 }
386 465
387 /** 466 /**
388 * {@inheritdoc} 467 * {@inheritdoc}
392 * instead. 471 * instead.
393 * 472 *
394 * @see https://www.drupal.org/node/2549139 473 * @see https://www.drupal.org/node/2549139
395 */ 474 */
396 public function getViewModes($entity_type_id) { 475 public function getViewModes($entity_type_id) {
476 @trigger_error('EntityManagerInterface::getViewModes() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getViewModes() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
397 return $this->container->get('entity_display.repository')->getViewModes($entity_type_id); 477 return $this->container->get('entity_display.repository')->getViewModes($entity_type_id);
398 } 478 }
399 479
400 /** 480 /**
401 * {@inheritdoc} 481 * {@inheritdoc}
405 * instead. 485 * instead.
406 * 486 *
407 * @see https://www.drupal.org/node/2549139 487 * @see https://www.drupal.org/node/2549139
408 */ 488 */
409 public function getAllFormModes() { 489 public function getAllFormModes() {
490 @trigger_error('EntityManagerInterface::getAllFormModes() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllFormModes() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
410 return $this->container->get('entity_display.repository')->getAllFormModes(); 491 return $this->container->get('entity_display.repository')->getAllFormModes();
411 } 492 }
412 493
413 /** 494 /**
414 * {@inheritdoc} 495 * {@inheritdoc}
418 * instead. 499 * instead.
419 * 500 *
420 * @see https://www.drupal.org/node/2549139 501 * @see https://www.drupal.org/node/2549139
421 */ 502 */
422 public function getFormModes($entity_type_id) { 503 public function getFormModes($entity_type_id) {
504 @trigger_error('EntityManagerInterface::getFormModes() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getFormModes() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
423 return $this->container->get('entity_display.repository')->getFormModes($entity_type_id); 505 return $this->container->get('entity_display.repository')->getFormModes($entity_type_id);
424 } 506 }
425 507
426 /** 508 /**
427 * {@inheritdoc} 509 * {@inheritdoc}
431 * instead. 513 * instead.
432 * 514 *
433 * @see https://www.drupal.org/node/2549139 515 * @see https://www.drupal.org/node/2549139
434 */ 516 */
435 public function getViewModeOptions($entity_type_id) { 517 public function getViewModeOptions($entity_type_id) {
518 @trigger_error('EntityManagerInterface::getViewModeOptions() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getViewModeOptions() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
436 return $this->container->get('entity_display.repository')->getViewModeOptions($entity_type_id); 519 return $this->container->get('entity_display.repository')->getViewModeOptions($entity_type_id);
437 } 520 }
438 521
439 /** 522 /**
440 * {@inheritdoc} 523 * {@inheritdoc}
444 * instead. 527 * instead.
445 * 528 *
446 * @see https://www.drupal.org/node/2549139 529 * @see https://www.drupal.org/node/2549139
447 */ 530 */
448 public function getFormModeOptions($entity_type_id) { 531 public function getFormModeOptions($entity_type_id) {
532 @trigger_error('EntityManagerInterface::getFormModeOptions() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getFormModeOptions() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
449 return $this->container->get('entity_display.repository')->getFormModeOptions($entity_type_id); 533 return $this->container->get('entity_display.repository')->getFormModeOptions($entity_type_id);
450 } 534 }
451 535
452 /** 536 /**
453 * {@inheritdoc} 537 * {@inheritdoc}
457 * instead. 541 * instead.
458 * 542 *
459 * @see https://www.drupal.org/node/2549139 543 * @see https://www.drupal.org/node/2549139
460 */ 544 */
461 public function getViewModeOptionsByBundle($entity_type_id, $bundle) { 545 public function getViewModeOptionsByBundle($entity_type_id, $bundle) {
546 @trigger_error('EntityManagerInterface::getViewModeOptionsByBundle() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getViewModeOptionsByBundle() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
462 return $this->container->get('entity_display.repository')->getViewModeOptionsByBundle($entity_type_id, $bundle); 547 return $this->container->get('entity_display.repository')->getViewModeOptionsByBundle($entity_type_id, $bundle);
463 } 548 }
464 549
465 /** 550 /**
466 * {@inheritdoc} 551 * {@inheritdoc}
470 * instead. 555 * instead.
471 * 556 *
472 * @see https://www.drupal.org/node/2549139 557 * @see https://www.drupal.org/node/2549139
473 */ 558 */
474 public function getFormModeOptionsByBundle($entity_type_id, $bundle) { 559 public function getFormModeOptionsByBundle($entity_type_id, $bundle) {
560 @trigger_error('EntityManagerInterface::getFormModeOptionsByBundle() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getFormModeOptionsByBundle() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
475 return $this->container->get('entity_display.repository')->getFormModeOptionsByBundle($entity_type_id, $bundle); 561 return $this->container->get('entity_display.repository')->getFormModeOptionsByBundle($entity_type_id, $bundle);
476 } 562 }
477 563
478 /** 564 /**
479 * {@inheritdoc} 565 * {@inheritdoc}
483 * instead. 569 * instead.
484 * 570 *
485 * @see https://www.drupal.org/node/2549139 571 * @see https://www.drupal.org/node/2549139
486 */ 572 */
487 public function clearDisplayModeInfo() { 573 public function clearDisplayModeInfo() {
574 @trigger_error('EntityManagerInterface::clearDisplayModeInfo() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityDisplayRepositoryInterface::clearDisplayModeInfo() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
488 $this->container->get('entity_display.repository')->clearDisplayModeInfo(); 575 $this->container->get('entity_display.repository')->clearDisplayModeInfo();
489 } 576 }
490 577
491 /** 578 /**
492 * {@inheritdoc} 579 * {@inheritdoc}
496 * instead. 583 * instead.
497 * 584 *
498 * @see https://www.drupal.org/node/2549139 585 * @see https://www.drupal.org/node/2549139
499 */ 586 */
500 public function loadEntityByUuid($entity_type_id, $uuid) { 587 public function loadEntityByUuid($entity_type_id, $uuid) {
588 @trigger_error('EntityManagerInterface::loadEntityByUuid() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityRepository::loadEntityByUuid() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
501 return $this->container->get('entity.repository')->loadEntityByUuid($entity_type_id, $uuid); 589 return $this->container->get('entity.repository')->loadEntityByUuid($entity_type_id, $uuid);
502 } 590 }
503 591
504 /** 592 /**
505 * {@inheritdoc} 593 * {@inheritdoc}
509 * instead. 597 * instead.
510 * 598 *
511 * @see https://www.drupal.org/node/2549139 599 * @see https://www.drupal.org/node/2549139
512 */ 600 */
513 public function loadEntityByConfigTarget($entity_type_id, $target) { 601 public function loadEntityByConfigTarget($entity_type_id, $target) {
602 @trigger_error('EntityManagerInterface::loadEntityByConfigTarget() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityRepository::loadEntityByConfigTarget() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
514 return $this->container->get('entity.repository')->loadEntityByConfigTarget($entity_type_id, $target); 603 return $this->container->get('entity.repository')->loadEntityByConfigTarget($entity_type_id, $target);
515 } 604 }
516 605
517 /** 606 /**
518 * {@inheritdoc} 607 * {@inheritdoc}
522 * instead. 611 * instead.
523 * 612 *
524 * @see https://www.drupal.org/node/2549139 613 * @see https://www.drupal.org/node/2549139
525 */ 614 */
526 public function getEntityTypeFromClass($class_name) { 615 public function getEntityTypeFromClass($class_name) {
616 @trigger_error('EntityManagerInterface::getEntityTypeFromClass() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeRepositoryInterface::getEntityTypeFromClass() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
527 return $this->container->get('entity_type.repository')->getEntityTypeFromClass($class_name); 617 return $this->container->get('entity_type.repository')->getEntityTypeFromClass($class_name);
528 } 618 }
529 619
530 /** 620 /**
531 * {@inheritdoc} 621 * {@inheritdoc}
532 */ 622 */
533 public function onEntityTypeCreate(EntityTypeInterface $entity_type) { 623 public function onEntityTypeCreate(EntityTypeInterface $entity_type) {
624 @trigger_error('EntityManagerInterface::onEntityTypeCreate() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeListenerInterface::onEntityTypeCreate() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
534 $this->container->get('entity_type.listener')->onEntityTypeCreate($entity_type); 625 $this->container->get('entity_type.listener')->onEntityTypeCreate($entity_type);
535 } 626 }
536 627
537 /** 628 /**
538 * {@inheritdoc} 629 * {@inheritdoc}
542 * instead. 633 * instead.
543 * 634 *
544 * @see https://www.drupal.org/node/2549139 635 * @see https://www.drupal.org/node/2549139
545 */ 636 */
546 public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original) { 637 public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
638 @trigger_error('EntityManagerInterface::onEntityTypeUpdate() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeListenerInterface::onEntityTypeUpdate() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
547 $this->container->get('entity_type.listener')->onEntityTypeUpdate($entity_type, $original); 639 $this->container->get('entity_type.listener')->onEntityTypeUpdate($entity_type, $original);
548 } 640 }
549 641
550 /** 642 /**
551 * {@inheritdoc} 643 * {@inheritdoc}
552 * 644 *
645 * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0.
646 * Use \Drupal\Core\Entity\EntityTypeListenerInterface::onFieldableEntityTypeUpdate()
647 * instead.
648 *
649 * @see https://www.drupal.org/project/drupal/issues/2984782
650 */
651 public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original, array $field_storage_definitions, array $original_field_storage_definitions, array &$sandbox = NULL) {
652 $this->container->get('entity_type.listener')->onFieldableEntityTypeUpdate($entity_type, $original, $field_storage_definitions, $original_field_storage_definitions, $sandbox);
653 }
654
655 /**
656 * {@inheritdoc}
657 *
553 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 658 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
554 * Use \Drupal\Core\Entity\EntityTypeListenerInterface::onEntityTypeDelete() 659 * Use \Drupal\Core\Entity\EntityTypeListenerInterface::onEntityTypeDelete()
555 * instead. 660 * instead.
556 * 661 *
557 * @see https://www.drupal.org/node/2549139 662 * @see https://www.drupal.org/node/2549139
558 */ 663 */
559 public function onEntityTypeDelete(EntityTypeInterface $entity_type) { 664 public function onEntityTypeDelete(EntityTypeInterface $entity_type) {
665 @trigger_error('EntityManagerInterface::onEntityTypeDelete() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeListenerInterface::onEntityTypeDelete() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
560 $this->container->get('entity_type.listener')->onEntityTypeDelete($entity_type); 666 $this->container->get('entity_type.listener')->onEntityTypeDelete($entity_type);
561 } 667 }
562 668
563 /** 669 /**
564 * {@inheritdoc} 670 * {@inheritdoc}
568 * instead. 674 * instead.
569 * 675 *
570 * @see https://www.drupal.org/node/2549139 676 * @see https://www.drupal.org/node/2549139
571 */ 677 */
572 public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) { 678 public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $storage_definition) {
679 @trigger_error('EntityManagerInterface::onFieldStorageDefinitionCreate() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Field\FieldStorageDefinitionListenerInterface::onFieldStorageDefinitionCreate() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
573 $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionCreate($storage_definition); 680 $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionCreate($storage_definition);
574 } 681 }
575 682
576 /** 683 /**
577 * {@inheritdoc} 684 * {@inheritdoc}
581 * instead. 688 * instead.
582 * 689 *
583 * @see https://www.drupal.org/node/2549139 690 * @see https://www.drupal.org/node/2549139
584 */ 691 */
585 public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) { 692 public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) {
693 @trigger_error('EntityManagerInterface::onFieldStorageDefinitionUpdate() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Field\FieldStorageDefinitionListenerInterface::onFieldStorageDefinitionUpdate() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
586 $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionUpdate($storage_definition, $original); 694 $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionUpdate($storage_definition, $original);
587 } 695 }
588 696
589 /** 697 /**
590 * {@inheritdoc} 698 * {@inheritdoc}
594 * instead. 702 * instead.
595 * 703 *
596 * @see https://www.drupal.org/node/2549139 704 * @see https://www.drupal.org/node/2549139
597 */ 705 */
598 public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) { 706 public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) {
707 @trigger_error('EntityManagerInterface::onFieldStorageDefinitionDelete() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Field\FieldStorageDefinitionListenerInterface::onFieldStorageDefinitionDelete() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
599 $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionDelete($storage_definition); 708 $this->container->get('field_storage_definition.listener')->onFieldStorageDefinitionDelete($storage_definition);
600 } 709 }
601 710
602 /** 711 /**
603 * {@inheritdoc} 712 * {@inheritdoc}
607 * instead. 716 * instead.
608 * 717 *
609 * @see https://www.drupal.org/node/2549139 718 * @see https://www.drupal.org/node/2549139
610 */ 719 */
611 public function onBundleCreate($bundle, $entity_type_id) { 720 public function onBundleCreate($bundle, $entity_type_id) {
721 @trigger_error('EntityManagerInterface::onBundleCreate() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityBundleListenerInterface::onBundleCreate() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
612 $this->container->get('entity_bundle.listener')->onBundleCreate($bundle, $entity_type_id); 722 $this->container->get('entity_bundle.listener')->onBundleCreate($bundle, $entity_type_id);
613 } 723 }
614 724
615 /** 725 /**
616 * {@inheritdoc} 726 * {@inheritdoc}
620 * instead. 730 * instead.
621 * 731 *
622 * @see https://www.drupal.org/node/2549139 732 * @see https://www.drupal.org/node/2549139
623 */ 733 */
624 public function onBundleDelete($bundle, $entity_type_id) { 734 public function onBundleDelete($bundle, $entity_type_id) {
735 @trigger_error('EntityManagerInterface::onBundleDelete() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityBundleListenerInterface::onBundleDelete() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
625 $this->container->get('entity_bundle.listener')->onBundleDelete($bundle, $entity_type_id); 736 $this->container->get('entity_bundle.listener')->onBundleDelete($bundle, $entity_type_id);
626 } 737 }
627 738
628 /** 739 /**
629 * {@inheritdoc} 740 * {@inheritdoc}
633 * instead. 744 * instead.
634 * 745 *
635 * @see https://www.drupal.org/node/2549139 746 * @see https://www.drupal.org/node/2549139
636 */ 747 */
637 public function getLastInstalledDefinition($entity_type_id) { 748 public function getLastInstalledDefinition($entity_type_id) {
749 @trigger_error('EntityManagerInterface::getLastInstalledDefinition() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface::getLastInstalledDefinition() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
638 return $this->container->get('entity.last_installed_schema.repository')->getLastInstalledDefinition($entity_type_id); 750 return $this->container->get('entity.last_installed_schema.repository')->getLastInstalledDefinition($entity_type_id);
639 } 751 }
640 752
641 /** 753 /**
642 * {@inheritdoc} 754 * {@inheritdoc}
755 *
756 * @deprecated EntityManagerInterface::useCaches() is deprecated in 8.0.0 and
757 * will be removed before Drupal 9.0.0. Use
758 * \Drupal\Core\Entity\EntityTypeManagerInterface::useCaches() and/or
759 * Drupal\Core\Entity\EntityFieldManagerInterface::useCaches() instead.
760 *
761 * @see https://www.drupal.org/node/2549139
643 */ 762 */
644 public function useCaches($use_caches = FALSE) { 763 public function useCaches($use_caches = FALSE) {
764 @trigger_error('EntityManagerInterface::useCaches() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeManagerInterface::useCaches() and/or Drupal\Core\Entity\EntityFieldManagerInterface::useCaches() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
645 $this->container->get('entity_type.manager')->useCaches($use_caches); 765 $this->container->get('entity_type.manager')->useCaches($use_caches);
646 766
647 // @todo EntityFieldManager is not a plugin manager, and should not co-opt 767 // @todo EntityFieldManager is not a plugin manager, and should not co-opt
648 // this method for managing its caches. 768 // this method for managing its caches.
649 $this->container->get('entity_field.manager')->useCaches($use_caches); 769 $this->container->get('entity_field.manager')->useCaches($use_caches);
657 * instead. 777 * instead.
658 * 778 *
659 * @see https://www.drupal.org/node/2549139 779 * @see https://www.drupal.org/node/2549139
660 */ 780 */
661 public function getLastInstalledFieldStorageDefinitions($entity_type_id) { 781 public function getLastInstalledFieldStorageDefinitions($entity_type_id) {
782 @trigger_error('EntityManagerInterface::getLastInstalledFieldStorageDefinitions() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface::getLastInstalledFieldStorageDefinitions() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
662 return $this->container->get('entity.last_installed_schema.repository')->getLastInstalledFieldStorageDefinitions($entity_type_id); 783 return $this->container->get('entity.last_installed_schema.repository')->getLastInstalledFieldStorageDefinitions($entity_type_id);
663 } 784 }
664 785
665 /** 786 /**
666 * {@inheritdoc} 787 * {@inheritdoc}
690 811
691 /** 812 /**
692 * {@inheritdoc} 813 * {@inheritdoc}
693 * 814 *
694 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. 815 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
816 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::getActiveDefinition()
817 * instead.
818 *
819 * @see https://www.drupal.org/node/3040966
820 */
821 public function getActiveDefinition($entity_type_id) {
822 @trigger_error('EntityManagerInterface::getActiveDefinition() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeManagerInterface::getActiveDefinition() instead. See https://www.drupal.org/node/3040966.', E_USER_DEPRECATED);
823 return $this->container->get('entity_type.manager')->getActiveDefinition($entity_type_id);
824 }
825
826 /**
827 * {@inheritdoc}
828 *
829 * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0.
695 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::createInstance() 830 * Use \Drupal\Core\Entity\EntityTypeManagerInterface::createInstance()
696 * instead. 831 * instead.
697 * 832 *
698 * @see https://www.drupal.org/node/2549139 833 * @see https://www.drupal.org/node/2549139
699 */ 834 */
700 public function createInstance($plugin_id, array $configuration = []) { 835 public function createInstance($plugin_id, array $configuration = []) {
836 @trigger_error('EntityManagerInterface::createInstance() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeManagerInterface::createInstance() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
701 return $this->container->get('entity_type.manager')->createInstance($plugin_id, $configuration); 837 return $this->container->get('entity_type.manager')->createInstance($plugin_id, $configuration);
702 } 838 }
703 839
704 /** 840 /**
705 * {@inheritdoc} 841 * {@inheritdoc}
709 * instead. 845 * instead.
710 * 846 *
711 * @see https://www.drupal.org/node/2549139 847 * @see https://www.drupal.org/node/2549139
712 */ 848 */
713 public function getInstance(array $options) { 849 public function getInstance(array $options) {
850 @trigger_error('EntityManagerInterface::getInstance() is deprecated in 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Entity\EntityTypeManagerInterface::getInstance() instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
714 return $this->container->get('entity_type.manager')->getInstance($options); 851 return $this->container->get('entity_type.manager')->getInstance($options);
715 } 852 }
716 853
717 } 854 }