You are here

protected function SvgImageFieldItem::getEntityTypeManager in SVG Image Field 8

Same name and namespace in other branches
  1. 2.1.x src/Plugin/Field/FieldType/SvgImageFieldItem.php \Drupal\svg_image_field\Plugin\Field\FieldType\SvgImageFieldItem::getEntityTypeManager()
  2. 2.0.x src/Plugin/Field/FieldType/SvgImageFieldItem.php \Drupal\svg_image_field\Plugin\Field\FieldType\SvgImageFieldItem::getEntityTypeManager()

Gets the entity manager.

Return value

\Drupal\Core\Entity\EntityTypeManagerInterface The entity manager service.

File

src/Plugin/Field/FieldType/SvgImageFieldItem.php, line 315

Class

SvgImageFieldItem
Plugin implementation of the 'svg_image' field type.

Namespace

Drupal\svg_image_field\Plugin\Field\FieldType

Code

protected function getEntityTypeManager() {
  if (!isset($this->entityTypeManager)) {
    $this->entityTypeManager = \Drupal::entityTypeManager();
  }
  return $this->entityTypeManager;
}