public function SelectOtherAllowedValuesConstraintValidator::__construct in CCK Select Other 8
Constructs a new SelectOtherAllowedValuesConstraintValidator.
Parameters
\Drupal\Core\Session\AccountInterface $current_user: The current user. Used for fallback mode.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity_type.manager service.
File
- src/
Validation/ Plugin/ Validation/ Constraint/ SelectOtherAllowedValuesConstraintValidator.php, line 61
Class
- SelectOtherAllowedValuesConstraintValidator
- Bypass AllowedValuesConstraintValidator by rewriting it.
Namespace
Drupal\cck_select_other\Validation\Plugin\Validation\ConstraintCode
public function __construct(AccountInterface $current_user, EntityTypeManagerInterface $entityTypeManager) {
$this->currentUser = $current_user;
$this
->setEntityTypeManager($entityTypeManager);
}