You are here

class UserProtection in User protect 8

Defines an user protection annotation object.

Hierarchy

Expanded class hierarchy of UserProtection

7 classes are annotated with UserProtection
Delete in src/Plugin/UserProtection/Delete.php
Protects the user from being deleted.
Edit in src/Plugin/UserProtection/Edit.php
Protects the user from being edited.
Mail in src/Plugin/UserProtection/Mail.php
Protects user's mail address.
Password in src/Plugin/UserProtection/Password.php
Protects user's password.
Roles in src/Plugin/UserProtection/Roles.php
Protects user's roles.

... See full list

File

src/Annotation/UserProtection.php, line 12

Namespace

Drupal\userprotect\Annotation
View source
class UserProtection extends Plugin {

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

  /**
   * The human-readable name of the protection.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * A brief description of the protection.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $description = '';

  /**
   * A default weight used for presentation in the user interface only.
   *
   * @var int
   */
  public $weight = 0;

  /**
   * Whether this protection is enabled or disabled by default.
   *
   * @var bool
   */
  public $status = FALSE;

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2
UserProtection::$description public property A brief description of the protection.
UserProtection::$id public property The plugin ID.
UserProtection::$label public property The human-readable name of the protection.
UserProtection::$status public property Whether this protection is enabled or disabled by default.
UserProtection::$weight public property A default weight used for presentation in the user interface only.