Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html_old/12park.006/web/core/modules/jsonapi/src/Revisions/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html_old/12park.006/web/core/modules/jsonapi/src/Revisions/VersionByRel.php

<?php

namespace Drupal\jsonapi\Revisions;

use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\RevisionableInterface;

/**
 * Revision ID implementation for the default or latest revisions.
 *
 * @internal JSON:API maintains no PHP API since its API is the HTTP API. This
 *   class may change at any time and this will break any dependencies on it.
 *
 * @see https://www.drupal.org/project/drupal/issues/3032787
 * @see jsonapi.api.php
 */
class VersionByRel extends NegotiatorBase {

  /**
   * Version argument which loads the revision known to be the "working copy".
   *
   * In Drupal terms, a "working copy" is the latest revision. It may or may not
   * be a "default" revision. This revision is the working copy because it is
   * the revision to which new work will be applied. In other words, it denotes
   * the most recent revision which might be considered a work-in-progress.
   *
   * @var string
   */
  const WORKING_COPY = 'working-copy';

  /**
   * Version argument which loads the revision known to be the "latest version".
   *
   * In Drupal terms, the "latest version" is the latest "default" revision. It
   * may or may not have later revisions after it, as long as none of them are
   * "default" revisions. This revision is the latest version because it is the
   * last revision where work was considered finished. Typically, this means
   * that it is the most recent "published" revision.
   *
   * @var string
   */
  const LATEST_VERSION = 'latest-version';

  /**
   * {@inheritdoc}
   */
  protected function getRevisionId(EntityInterface $entity, $version_argument) {
    assert($entity instanceof RevisionableInterface);
    switch ($version_argument) {
      case static::WORKING_COPY:
        /* @var \Drupal\Core\Entity\RevisionableStorageInterface $entity_storage */
        $entity_storage = $this->entityTypeManager->getStorage($entity->getEntityTypeId());
        return static::ensureVersionExists($entity_storage->getLatestRevisionId($entity->id()));

      case static::LATEST_VERSION:
        // The already loaded revision will be the latest version by default.
        // @see \Drupal\Core\Entity\Sql\SqlContentEntityStorage::buildQuery().
        return $entity->getLoadedRevisionId();

      default:
        $message = sprintf('The version specifier must be either `%s` or `%s`, `%s` given.', static::LATEST_VERSION, static::WORKING_COPY, $version_argument);
        throw new InvalidVersionIdentifierException($message);
    }
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net