function Serializer::calculateDependencies
Same name in other branches
- 9 core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::calculateDependencies()
- 8.9.x core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::calculateDependencies()
- 11.x core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::calculateDependencies()
Overrides PluginBase::calculateDependencies
File
-
core/
modules/ rest/ src/ Plugin/ views/ style/ Serializer.php, line 183
Class
- Serializer
- The style plugin for serialized output formats.
Namespace
Drupal\rest\Plugin\views\styleCode
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
$formats = $this->getFormats();
$providers = array_intersect_key($this->formatProviders, array_flip($formats));
// The plugin always uses services from the serialization module.
$providers[] = 'serialization';
$dependencies += [
'module' => [],
];
$dependencies['module'] = array_merge($dependencies['module'], $providers);
return $dependencies;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.