data_pipelines-1.x-dev/src/Attribute/DatasetSource.php

src/Attribute/DatasetSource.php
<?php

declare(strict_types=1);

namespace Drupal\data_pipelines\Attribute;

use Drupal\Component\Plugin\Attribute\Plugin;
use Drupal\Core\StringTranslation\TranslatableMarkup;

/**
 * Defines a DatasetSource attribute for plugin discovery.
 */
#[\Attribute(\Attribute::TARGET_CLASS)]
class DatasetSource extends Plugin {

  /**
   * Constructs a DatasetSource attribute.
   *
   * @param string $id
   *   The plugin ID.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup $label
   *   The plugin label.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
   *   (optional) A description for the source plugin.
   * @param class-string|null $deriver
   *   (optional) The deriver class.
   */
  public function __construct(
    public readonly string $id,
    public readonly TranslatableMarkup $label,
    public readonly ?TranslatableMarkup $description = NULL,
    public readonly ?string $deriver = NULL,
  ) {}

}

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

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