og-8.x-1.x-dev/src/Attribute/OgGroupResolver.php

src/Attribute/OgGroupResolver.php
<?php

declare(strict_types=1);

namespace Drupal\og\Attribute;

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

/**
 * Defines the OgGroupResolver annotation object.
 *
 * Plugin Namespace: Plugin\OgGroupResolver.
 */
#[\Attribute(\Attribute::TARGET_CLASS)]
class OgGroupResolver extends Plugin {

  /**
   * Constructs a new OgGroupResolver attribute instance.
   *
   * @param string $id
   *   The plugin ID.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup|string $label
   *   The plugin label.
   * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
   *   (optional) The plugin description.
   */
  public function __construct(
    public readonly string $id,
    public readonly TranslatableMarkup|string $label,
    public readonly ?TranslatableMarkup $description,
  ) {
    if (is_string($label)) {
      @trigger_error('Passing $label as string to ' . __METHOD__ . '() is deprecated in og:2.0.0 and is removed from og:3.0.0. Pass the label as translatable markup instead. See https://www.drupal.org/node/3503794', E_USER_DEPRECATED);
    }
  }

}

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

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