public function OnlyOneConstraintValidator::__construct in Allow a content type only once (Only One) 8
Constructor.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\onlyone\OnlyOneInterface $onlyone: The onlyone service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.
File
- src/
Plugin/ Validation/ Constraint/ OnlyOneConstraintValidator.php, line 49
Class
- OnlyOneConstraintValidator
- Validates the OnlyOne constraint.
Namespace
Drupal\onlyone\Plugin\Validation\ConstraintCode
public function __construct(ConfigFactoryInterface $config_factory, OnlyOneInterface $onlyone, EntityTypeManagerInterface $entity_type_manager) {
$this->configFactory = $config_factory;
$this->onlyone = $onlyone;
$this->entityTypeManager = $entity_type_manager;
}