function StageBase::computeDestroyMessage

Returns the specific destroy message for the ID.

Parameters

string $unique_id: The unique ID that was returned by ::create().

\Drupal\Core\StringTranslation\TranslatableMarkup $fallback_message: A fallback message, in case no specific message was stored.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup A message describing why the stage with the given ID was destroyed, or if no message was associated with that destroyed stage, the provided fallback message.

File

core/modules/package_manager/src/StageBase.php, line 687

Class

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

Namespace

Drupal\package_manager

Code

private function computeDestroyMessage(string $unique_id, TranslatableMarkup $fallback_message) : TranslatableMarkup {
    // Check to see if we have a specific message about a stage with a
    // specific ID that was given.
    return $this->tempStore
        ->get(self::TEMPSTORE_DESTROYED_STAGES_INFO_PREFIX . $unique_id) ?? $fallback_message;
}

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