function ProxyBuilder::buildUseStatements

Same name in this branch
  1. 8.9.x core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php \Drupal\Component\ProxyBuilder\ProxyBuilder::buildUseStatements()
Same name in other branches
  1. 9 core/lib/Drupal/Core/ProxyBuilder/ProxyBuilder.php \Drupal\Core\ProxyBuilder\ProxyBuilder::buildUseStatements()
  2. 9 core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php \Drupal\Component\ProxyBuilder\ProxyBuilder::buildUseStatements()
  3. 10 core/lib/Drupal/Core/ProxyBuilder/ProxyBuilder.php \Drupal\Core\ProxyBuilder\ProxyBuilder::buildUseStatements()
  4. 10 core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php \Drupal\Component\ProxyBuilder\ProxyBuilder::buildUseStatements()
  5. 11.x core/lib/Drupal/Core/ProxyBuilder/ProxyBuilder.php \Drupal\Core\ProxyBuilder\ProxyBuilder::buildUseStatements()
  6. 11.x core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php \Drupal\Component\ProxyBuilder\ProxyBuilder::buildUseStatements()

Overrides ProxyBuilder::buildUseStatements

File

core/lib/Drupal/Core/ProxyBuilder/ProxyBuilder.php, line 15

Class

ProxyBuilder
Extend the component proxy builder by using the DependencySerializationTrait.

Namespace

Drupal\Core\ProxyBuilder

Code

protected function buildUseStatements() {
    $output = parent::buildUseStatements();
    $output .= 'use \\Drupal\\Core\\DependencyInjection\\DependencySerializationTrait;' . "\n\n";
    return $output;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.