halSettings = $config_factory->get('hal.settings'); } /** * {@inheritdoc} */ public function normalize($entity, $format = NULL, array $context = []) { $data = parent::normalize($entity, $format, $context); $this->addCacheableDependency($context, $this->halSettings); if ($this->halSettings->get('bc_file_uri_as_url_normalizer')) { // Replace the file url with a full url for the file. $data['uri'][0]['value'] = $this->getEntityUri($entity); } return $data; } }