You are here

class PrivateMessageThreadMemberConstraint in Private Message 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Validation/Constraint/PrivateMessageThreadMemberConstraint.php \Drupal\private_message\Plugin\Validation\Constraint\PrivateMessageThreadMemberConstraint

Checks that members of the thread have permission to use private messages.

Plugin annotation


@Constraint(
  id = "private_message_thread_member",
  label = @Translation("Private Message Thread Member", context = "Validation"),
)

Hierarchy

Expanded class hierarchy of PrivateMessageThreadMemberConstraint

File

src/Plugin/Validation/Constraint/PrivateMessageThreadMemberConstraint.php, line 15

Namespace

Drupal\private_message\Plugin\Validation\Constraint
View source
class PrivateMessageThreadMemberConstraint extends Constraint {

  /**
   * Constraint violation error.
   *
   * The message that is shown if the user does not have permission to use the
   * private message system. We give a user not found error rather than a
   * permissions error, as revealing a permissions error would allow users to
   * discover users on the site who are not part of the private message system.
   *
   * @var string
   */
  public $userPrivateMessagePermissionError = 'User %user not found';

}

Members