Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ManifestSerializer.php

function ManifestSerializer::addBundles

1 call to ManifestSerializer::addBundles()
ManifestSerializer::serializeToString in vendor/phar-io/manifest/src/ManifestSerializer.php

File

vendor/phar-io/manifest/src/ManifestSerializer.php, line 150

Class

ManifestSerializer
@psalm-suppress MissingConstructor

Namespace

PharIo\Manifest

Code

private function addBundles(BundledComponentCollection $bundledComponentCollection) : void {
    if (count($bundledComponentCollection) === 0) {
        return;
    }
    $this->xmlWriter
        ->startElement('bundles');
    foreach ($bundledComponentCollection as $bundledComponent) {
        $this->xmlWriter
            ->startElement('component');
        $this->xmlWriter
            ->writeAttribute('name', $bundledComponent->getName());
        $this->xmlWriter
            ->writeAttribute('version', $bundledComponent->getVersion()
            ->getVersionString());
        $this->xmlWriter
            ->endElement();
    }
    $this->xmlWriter
        ->endElement();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal