function EntityDeriver::create

Same name in this branch
  1. 9 core/modules/rest/src/Plugin/Deriver/EntityDeriver.php \Drupal\rest\Plugin\Deriver\EntityDeriver::create()
Same name and namespace in other branches
  1. 8.9.x core/modules/rest/src/Plugin/Deriver/EntityDeriver.php \Drupal\rest\Plugin\Deriver\EntityDeriver::create()
  2. 8.9.x core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php \Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver::create()
  3. 10 core/modules/rest/src/Plugin/Deriver/EntityDeriver.php \Drupal\rest\Plugin\Deriver\EntityDeriver::create()
  4. 10 core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php \Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver::create()
  5. 11.x core/modules/rest/src/Plugin/Deriver/EntityDeriver.php \Drupal\rest\Plugin\Deriver\EntityDeriver::create()
  6. 11.x core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php \Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver::create()

Overrides ContainerDeriverInterface::create

File

core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php, line 65

Class

EntityDeriver
Provides data type plugins for each existing entity type and bundle.

Namespace

Drupal\Core\Entity\Plugin\DataType\Deriver

Code

public static function create(ContainerInterface $container, $base_plugin_id) {
    return new static($base_plugin_id, $container->get('entity_type.manager'), $container->get('entity_type.bundle.info'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.