function SandboxManagerBase::getSandboxDirectory

Returns the path of the directory where changes should be staged.

Return value

string The absolute path of the directory where changes should be staged.

Throws

\LogicException If this method is called before the stage has been created or claimed.

5 calls to SandboxManagerBase::getSandboxDirectory()
SandboxManagerBase::apply in core/modules/package_manager/src/SandboxManagerBase.php
Applies staged changes to the active directory.
SandboxManagerBase::create in core/modules/package_manager/src/SandboxManagerBase.php
Copies the active code base into the stage directory.
SandboxManagerBase::destroy in core/modules/package_manager/src/SandboxManagerBase.php
Deletes the stage directory.
SandboxManagerBase::require in core/modules/package_manager/src/SandboxManagerBase.php
Adds or updates packages in the stage directory.
SandboxManagerBase::sandboxDirectoryExists in core/modules/package_manager/src/SandboxManagerBase.php
Determines if the stage directory exists.

File

core/modules/package_manager/src/SandboxManagerBase.php, line 725

Class

SandboxManagerBase
Creates and manages a stage directory in which to install or update code.

Namespace

Drupal\package_manager

Code

public function getSandboxDirectory() : string {
    if (!$this->lock) {
        throw new \LogicException(__METHOD__ . '() cannot be called because the stage has not been created or claimed.');
    }
    return $this->getStagingRoot() . DIRECTORY_SEPARATOR . $this->lock[0];
}

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