3 namespace Drupal\Core\Display\Annotation;
5 use Drupal\Component\Annotation\Plugin;
8 * Defines a display variant annotation object.
10 * Display variants are used to dictate the output of a given Display, which
11 * can be used to control the output of many parts of Drupal.
13 * Variants are usually chosen by some selection criteria, and are instantiated
14 * directly. Each variant must define its own approach to rendering, and can
15 * either load its own data or be injected with data from another Display
18 * @todo: Revise description when/if Displays are added to core:
19 * https://www.drupal.org/node/2292733
21 * Plugin namespace: Plugin\DisplayVariant
23 * For working examples, see
24 * - \Drupal\Core\Render\Plugin\DisplayVariant\SimplePageVariant
25 * - \Drupal\block\Plugin\DisplayVariant\BlockPageVariant
27 * @see \Drupal\Core\Display\VariantInterface
28 * @see \Drupal\Core\Display\VariantBase
29 * @see \Drupal\Core\Display\VariantManager
30 * @see \Drupal\Core\Display\PageVariantInterface
35 class DisplayVariant extends Plugin {
45 * The administrative label.
47 * @var \Drupal\Core\Annotation\Translation
49 * @ingroup plugin_translatable
51 public $admin_label = '';