class ControllerStage
Non-abstract version of StageBase.
This is needed because we cannot instantiate StageBase as it's abstract, and we also can't use anonymous class because the name of anonymous class is always unique for every request which will create problem while claiming the stage as the stored lock will be different from current lock.
Hierarchy
- class \Drupal\package_manager\StageBase implements \Psr\Log\LoggerAwareInterface uses \Psr\Log\LoggerAwareTrait, \Drupal\Core\StringTranslation\StringTranslationTrait
- class \Drupal\package_manager_test_api\ControllerStage extends \Drupal\package_manager\StageBase
Expanded class hierarchy of ControllerStage
See also
\Drupal\package_manager\StageBase::claim()
1 file declares its use of ControllerStage
- PackageUpdateTest.php in core/
modules/ package_manager/ tests/ src/ Build/ PackageUpdateTest.php
File
-
core/
modules/ package_manager/ tests/ modules/ package_manager_test_api/ src/ ApiController.php, line 145
Namespace
Drupal\package_manager_test_apiView source
final class ControllerStage extends StageBase {
/**
* {@inheritdoc}
*/
protected string $type = 'package_manager_test_api:controller';
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ControllerStage::$type | protected | property | The stage type. | Overrides StageBase::$type | |
StageBase::$lock | private | property | The lock info for the stage. | ||
StageBase::$tempStore | protected | property | The shared temp store. | ||
StageBase::apply | public | function | Applies staged changes to the active directory. | ||
StageBase::checkOwnership | final protected | function | Validates the ownership of stage directory. | ||
StageBase::claim | final public | function | Attempts to claim the stage. | ||
StageBase::COMPOSER_PACKAGE_REGEX | private | constant | The regular expression to check if a package name is a regular package. | ||
StageBase::COMPOSER_PLATFORM_PACKAGE_REGEX | private | constant | The regular expression to check if a package name is a platform package. | ||
StageBase::computeDestroyMessage | private | function | Returns the specific destroy message for the ID. | ||
StageBase::create | public | function | Copies the active code base into the stage directory. | ||
StageBase::destroy | public | function | Deletes the stage directory. | ||
StageBase::dispatch | protected | function | Dispatches an event and handles any errors that it collects. | ||
StageBase::getFailureMarkerMessage | protected | function | Returns the failure marker message. | ||
StageBase::getMetadata | public | function | Returns a specific piece of metadata associated with this stage. | ||
StageBase::getPathsToExclude | protected | function | Collects paths that Composer Stager should exclude. | ||
StageBase::getStageDirectory | public | function | Returns the path of the directory where changes should be staged. | ||
StageBase::getStagingRoot | private | function | Returns the directory where stage directories will be created. | ||
StageBase::getType | final public | function | Gets the stage type. | ||
StageBase::isApplying | final public | function | Checks if staged changes are being applied to the active directory. | ||
StageBase::isAvailable | final public | function | Determines if the stage directory can be created. | ||
StageBase::markAsAvailable | protected | function | Marks the stage as available. | ||
StageBase::postApply | public | function | Performs post-apply tasks. | ||
StageBase::require | public | function | Adds or updates packages in the stage directory. | ||
StageBase::rethrowAsStageException | private | function | Wraps an exception in a StageException and re-throws it. | ||
StageBase::setMetadata | public | function | Stores arbitrary metadata associated with this stage. | ||
StageBase::setNotApplying | private | function | Returns a closure that marks this stage as no longer being applied. | ||
StageBase::stageDirectoryExists | public | function | Determines if the stage directory exists. | ||
StageBase::storeDestroyInfo | protected | function | Stores information about the stage when it is destroyed. | ||
StageBase::TEMPSTORE_APPLY_TIME_KEY | private | constant | The tempstore key under which to store the time that ::apply() was called. | ||
StageBase::TEMPSTORE_CHANGES_APPLIED | private | constant | The tempstore key for whether staged operations have been applied. | ||
StageBase::TEMPSTORE_DESTROYED_STAGES_INFO_PREFIX | private | constant | The tempstore key for information about previously destroyed stages. | ||
StageBase::TEMPSTORE_LOCK_KEY | final protected | constant | The tempstore key under which to store the locking info for this stage. | ||
StageBase::TEMPSTORE_METADATA_KEY | final protected | constant | The tempstore key under which to store arbitrary metadata for this stage. | ||
StageBase::TEMPSTORE_STAGING_ROOT_KEY | private | constant | The tempstore key under which to store the path of stage root directory. | ||
StageBase::validateRequirements | protected static | function | Validates a set of package names. | ||
StageBase::__construct | public | function | 1 | ||
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | 3 | |
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | ||
StringTranslationTrait::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | ||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | ||
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | 2 | |
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.