function ScaffoldOptions::hasOptions

Same name in other branches
  1. 9 composer/Plugin/Scaffold/ScaffoldOptions.php \Drupal\Composer\Plugin\Scaffold\ScaffoldOptions::hasOptions()
  2. 8.9.x composer/Plugin/Scaffold/ScaffoldOptions.php \Drupal\Composer\Plugin\Scaffold\ScaffoldOptions::hasOptions()
  3. 10 composer/Plugin/Scaffold/ScaffoldOptions.php \Drupal\Composer\Plugin\Scaffold\ScaffoldOptions::hasOptions()

Determines if the provided 'extras' section has scaffold options.

Parameters

array $extras: The contents of the 'extras' section.

Return value

bool True if scaffold options have been declared

2 calls to ScaffoldOptions::hasOptions()
AllowedPackages::event in composer/Plugin/Scaffold/AllowedPackages.php
Handles package events during a 'composer require' operation.
ScaffoldOptions::create in composer/Plugin/Scaffold/ScaffoldOptions.php
Creates a scaffold options object.

File

composer/Plugin/Scaffold/ScaffoldOptions.php, line 53

Class

ScaffoldOptions
Per-project options from the 'extras' section of the composer.json file.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

public static function hasOptions(array $extras) {
    return array_key_exists('drupal-scaffold', $extras);
}

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