Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

AutoconfigureTag.php

Namespace

Symfony\Component\DependencyInjection\Attribute

File

vendor/symfony/dependency-injection/Attribute/AutoconfigureTag.php

View source
<?php


/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Symfony\Component\DependencyInjection\Attribute;


/**
 * An attribute to tell how a base type should be tagged.
 *
 * @author Nicolas Grekas <p@tchwork.com>
 */
class AutoconfigureTag extends Autoconfigure {
    
    /**
     * @param string|null             $name       The tag name to add
     * @param array<array-key, mixed> $attributes The tag attributes to attach to the tag
     */
    public function __construct(?string $name = null, array $attributes = []) {
        parent::__construct(tags: [
            [
                $name ?? 0 => $attributes,
            ],
        ]);
    }

}

Classes

Title Deprecated Summary
AutoconfigureTag An attribute to tell how a base type should be tagged.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal