You are here

public static function EntityBrowserElement::processEntityId in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 src/Element/EntityBrowserElement.php \Drupal\entity_browser\Element\EntityBrowserElement::processEntityId()

Processes entity IDs and gets array of loaded entities.

Parameters

string $id: Processes entity ID as it is returned from the entity browser. ID should be in [entity_type_id]:[entity_id] form.

Return value

\Drupal\Core\Entity\EntityInterface Entity object.

1 call to EntityBrowserElement::processEntityId()
FormElementTest::buildForm in tests/modules/entity_browser_test/src/Form/FormElementTest.php
Form constructor.

File

src/Element/EntityBrowserElement.php, line 275

Class

EntityBrowserElement
Provides an Entity Browser form element.

Namespace

Drupal\entity_browser\Element

Code

public static function processEntityId($id) {
  $return = static::processEntityIds([
    $id,
  ]);
  return current($return);
}