
| Current Path : /var/www/html/strat/web/core/modules/search/src/Attribute/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/strat/web/core/modules/search/src/Attribute/Search.php |
<?php
namespace Drupal\search\Attribute;
use Drupal\Component\Plugin\Attribute\Plugin;
use Drupal\Core\StringTranslation\TranslatableMarkup;
/**
* Defines a Search type attribute for plugin discovery.
*
* Search classes define search types for the core Search module. Each search
* type can be used to create search pages from the Search settings page.
*
* @see SearchPluginBase
*
* @ingroup search
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class Search extends Plugin {
/**
* Constructs a Search attribute.
*
* @param string $id
* The plugin ID.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $title
* The title for the search page tab.
* @param bool $use_admin_theme
* Whether search results should be displayed in admin theme or not.
* @param class-string|null $deriver
* (optional) The deriver class.
*/
public function __construct(
public readonly string $id,
public readonly ?TranslatableMarkup $title = NULL,
public readonly bool $use_admin_theme = FALSE,
public readonly ?string $deriver = NULL,
) {}
}