You are here

public function ProcessingContext::getContentLoader in YAML Content 8

Get the content loader context.

Return value

\Drupal\yaml_content\ContentLoader\ContentLoaderInterface The content loader instance actively loading content.

File

src/Plugin/ProcessingContext.php, line 67

Class

ProcessingContext
The contextual data for content being actively loaded.

Namespace

Drupal\yaml_content\Plugin

Code

public function getContentLoader() {
  if (!isset($this->contentLoader)) {

    // @todo Impelment a more specific exception.
    throw new \Exception('Missing content loader context.');
  }
  return $this->contentLoader;
}