Dumps the service container to PHP code in the config directory.
This method is based on the dumpContainer method in the parent class, but that method is reliant on the Config component which we do not use here.
ContainerBuilder $container: The service container.
string $baseClass: The name of the container's base class
bool TRUE if the container was successfully dumped to disk.
protected function dumpDrupalContainer(ContainerBuilder $container, $baseClass) {
if (!$this
->storage()
->writeable()) {
return FALSE;
}
// Cache the container.
$dumper = new PhpDumper($container);
$class = $this
->getClassName();
$content = $dumper
->dump(array(
'class' => $class,
'base_class' => $baseClass,
));
return $this
->storage()
->save($class . '.php', $content);
}