ScaffoldOptions
class ScaffoldOptions (View source)
| internal |
Per-project options from the 'extras' section of the composer.json file.
Projects that describe scaffold files do so via their scaffold options. This data is pulled from the 'drupal-scaffold' portion of the extras section of the project data.
Properties
| protected array | $options | The raw data from the 'extras' section of the top-level composer.json file. |
Methods
ScaffoldOptions constructor.
Determines if the provided 'extras' section has scaffold options.
Creates a scaffold options object.
Creates a new scaffold options object with some values overridden.
Creates a new scaffold options object with an overridden 'symlink' value.
Determines whether any allowed packages were defined.
Gets allowed packages from these options.
Gets the location mapping table, e.g. 'webroot' => './'.
Determines whether a given named location is defined.
Gets a specific named location.
Determines if symlink mode is set.
Determines if there are file mappings.
Returns the actual file mappings.
Determines if there is defined a value for the 'gitignore' option.
Gets the value of the 'gitignore' option.
Details
protected
__construct(array $options)
ScaffoldOptions constructor.
static bool
hasOptions(array $extras)
Determines if the provided 'extras' section has scaffold options.
static ScaffoldOptions
create(array $extras)
Creates a scaffold options object.
protected ScaffoldOptions
override(array $options)
Creates a new scaffold options object with some values overridden.
ScaffoldOptions
overrideSymlink(bool $symlink)
Creates a new scaffold options object with an overridden 'symlink' value.
bool
hasAllowedPackages()
Determines whether any allowed packages were defined.
array
allowedPackages()
Gets allowed packages from these options.
array
locations()
Gets the location mapping table, e.g. 'webroot' => './'.
protected bool
hasLocation(string $name)
Determines whether a given named location is defined.
string
getLocation(string $name)
Gets a specific named location.
bool
symlink()
Determines if symlink mode is set.
bool
hasFileMapping()
Determines if there are file mappings.
array
fileMapping()
Returns the actual file mappings.
bool
hasGitIgnore()
Determines if there is defined a value for the 'gitignore' option.
bool
gitIgnore()
Gets the value of the 'gitignore' option.