PluginExample.php

Contains \Drupal\plugin_test\Plugin\Annotation\PluginExample.

Namespace

Drupal\plugin_test\Plugin\Annotation

File

drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/Annotation/PluginExample.php
View source
<?php

/**
 * @file
 * Contains \Drupal\plugin_test\Plugin\Annotation\PluginExample.
 */
namespace Drupal\plugin_test\Plugin\Annotation;

use Drupal\Component\Annotation\AnnotationInterface;

/**
 * Defines a custom Plugin annotation.
 *
 * @Annotation
 */
class PluginExample implements AnnotationInterface {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * Another plugin metadata.
   *
   * @var string
   */
  public $custom;

  /**
   * {@inheritdoc}
   */
  public function get() {
    return array(
      'id' => $this->id,
      'custom' => $this->custom,
    );
  }

}

Classes

Namesort descending Description
PluginExample Defines a custom Plugin annotation.