public function getRendererLocatorForOutputFormat(OutputFormatInterface $output_format) { $name = $output_format->getName(); if (!array_key_exists($name, $this->loaded_locators)) { $implementor = $output_format->getRendererLocator(); if (empty($implementor)) { $implementor = RendererLocator::CLASS; } if (empty($implementor)) { throw new RuntimeError('No renderer_locator implementor specified for output format: ' . $name); } $state = [':output_format' => $output_format]; $this->loaded_locators[$name] = $this->service_locator->createEntity($implementor, $state); } return $this->loaded_locators[$name]; }