l10n_server-2.x-dev/l10n_packager/src/Plugin/QueueWorker/PackagerQueue.php

l10n_packager/src/Plugin/QueueWorker/PackagerQueue.php
<?php

declare(strict_types=1);

namespace Drupal\l10n_packager\Plugin\QueueWorker;

use Drupal\Core\Queue\QueueWorkerBase;
use Drupal\l10n_server\Entity\L10nServerReleaseInterface;

/**
 * Defines 'l10n_server_packager' queue worker.
 *
 * @QueueWorker(
 *   id = "l10n_server_packager",
 *   title = @Translation("Package releases"),
 * )
 */
class PackagerQueue extends QueueWorkerBase {

  /**
   * {@inheritdoc}
   */
  public function processItem($data) {
    if ($data instanceof L10nServerReleaseInterface) {
      // Reload the current release object.
      $release = \Drupal::entityTypeManager()
        ->getStorage('l10n_server_release')
        ->load($data->id());
    }
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc