class ScaffoldResult

Same name and namespace in other branches
  1. 9 composer/Plugin/Scaffold/Operations/ScaffoldResult.php \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldResult
  2. 8.9.x composer/Plugin/Scaffold/Operations/ScaffoldResult.php \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldResult
  3. 10 composer/Plugin/Scaffold/Operations/ScaffoldResult.php \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldResult

Record the result of a scaffold operation.

@internal

Hierarchy

Expanded class hierarchy of ScaffoldResult

1 file declares its use of ScaffoldResult
GenerateAutoloadReferenceFile.php in composer/Plugin/Scaffold/GenerateAutoloadReferenceFile.php

File

composer/Plugin/Scaffold/Operations/ScaffoldResult.php, line 12

Namespace

Drupal\Composer\Plugin\Scaffold\Operations
View source
class ScaffoldResult {
    
    /**
     * The path to the scaffold file that was processed.
     *
     * @var \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath
     */
    protected $destination;
    
    /**
     * Indicates if this scaffold file is managed by the scaffold command.
     *
     * @var bool
     */
    protected $managed;
    
    /**
     * ScaffoldResult constructor.
     *
     * @param \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath $destination
     *   The path to the scaffold file that was processed.
     * @param bool $isManaged
     *   (optional) Whether this result is managed. Defaults to FALSE.
     */
    public function __construct(ScaffoldFilePath $destination, $isManaged = FALSE) {
        $this->destination = $destination;
        $this->managed = $isManaged;
    }
    
    /**
     * Determines whether this scaffold file is managed.
     *
     * @return bool
     *   TRUE if this scaffold file is managed, FALSE if not.
     */
    public function isManaged() {
        return $this->managed;
    }
    
    /**
     * Gets the destination scaffold file that this result refers to.
     *
     * @return \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath
     *   The destination path for the scaffold result.
     */
    public function destination() {
        return $this->destination;
    }

}

Members

Title Sort descending Modifiers Object type Summary
ScaffoldResult::$destination protected property The path to the scaffold file that was processed.
ScaffoldResult::$managed protected property Indicates if this scaffold file is managed by the scaffold command.
ScaffoldResult::destination public function Gets the destination scaffold file that this result refers to.
ScaffoldResult::isManaged public function Determines whether this scaffold file is managed.
ScaffoldResult::__construct public function ScaffoldResult constructor.

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