You are here

public function PlaceholderResolverTrait::getPlaceholderResolver in Typed Data API enhancements 8

Gets the placeholder resolver.

Return value

\Drupal\typed_data\PlaceholderResolverInterface The placeholder resolver.

File

src/PlaceholderResolverTrait.php, line 36

Class

PlaceholderResolverTrait
Helper for classes that need the placeholder resolver.

Namespace

Drupal\typed_data

Code

public function getPlaceholderResolver() {
  if (empty($this->placeholderResolver)) {
    $this->placeholderResolver = \Drupal::service('typed_data.placeholder_resolver');
  }
  return $this->placeholderResolver;
}