function ScaffoldOptions::create

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

Creates a scaffold options object.

Parameters

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

Return value

self The scaffold options object representing the provided scaffold options

5 calls to ScaffoldOptions::create()
AppendOpTest::testProcess in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/AppendOpTest.php
@covers ::process
ManageOptions::packageOptions in composer/Plugin/Scaffold/ManageOptions.php
Gets the scaffold options for the stipulated project.
ReplaceOpTest::testEmptyFile in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ReplaceOpTest.php
@covers ::process
ReplaceOpTest::testProcess in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ReplaceOpTest.php
@covers ::process
SkipOpTest::testProcess in core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/SkipOpTest.php
@covers ::process

File

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

Class

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

Namespace

Drupal\Composer\Plugin\Scaffold

Code

public static function create(array $extras) {
    $options = static::hasOptions($extras) ? $extras['drupal-scaffold'] : [];
    return new self($options);
}

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