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

Breadcrumb

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

function ManifestDocumentMapper::mapCopyright

1 call to ManifestDocumentMapper::mapCopyright()
ManifestDocumentMapper::map in vendor/phar-io/manifest/src/ManifestDocumentMapper.php

File

vendor/phar-io/manifest/src/ManifestDocumentMapper.php, line 56

Class

ManifestDocumentMapper

Namespace

PharIo\Manifest

Code

private function mapCopyright(CopyrightElement $copyright) : CopyrightInformation {
    $authors = new AuthorCollection();
    foreach ($copyright->getAuthorElements() as $authorElement) {
        $authors->add(new Author($authorElement->getName(), $authorElement->hasEMail() ? new Email($authorElement->getEmail()) : null));
    }
    $licenseElement = $copyright->getLicenseElement();
    $license = new License($licenseElement->getType(), new Url($licenseElement->getUrl()));
    return new CopyrightInformation($authors, $license);
}

API Navigation

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