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

Breadcrumb

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

function SpdxLicenses::getExceptionByIdentifier

Returns license exception metadata by license exception identifier.

This function adds a link to the full license exception text to the license exception metadata. The array returned is in the form of:

[ 0 => full name (string), 1 => link to license text (string) ]

Parameters

string $identifier:

Return value

array{0: string, 1: string}|null

File

vendor/composer/spdx-licenses/src/SpdxLicenses.php, line 120

Class

SpdxLicenses

Namespace

Composer\Spdx

Code

public function getExceptionByIdentifier($identifier) {
    $key = strtolower($identifier);
    if (!isset($this->exceptions[$key])) {
        return null;
    }
    list($identifier, $name) = $this->exceptions[$key];
    return array(
        $name,
        'https://spdx.org/licenses/' . $identifier . '.html#licenseExceptionText',
    );
}

API Navigation

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