public function SpambotUserspamForm::__construct in Spambot 8
Constructs a \Drupal\system\ConfigFormBase object.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.
\Drupal\Core\Database\Connection $connection: Constructs a Connection object.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Provides an interface for an entity type and its metadata.
\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: Interface for classes that manage a set of enabled modules.
\Drupal\Core\Messenger\MessengerInterface $messenger: Stores runtime messages sent out to individual users on the page.
Overrides ConfigFormBase::__construct
File
- src/
Form/ SpambotUserspamForm.php, line 85
Class
- SpambotUserspamForm
- Settings form to save the configuration for Spambot.
Namespace
Drupal\spambot\FormCode
public function __construct(ConfigFactoryInterface $config_factory, Connection $connection, EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, MessengerInterface $messenger) {
parent::__construct($config_factory);
$this->connection = $connection;
$this->entityTypeManager = $entityTypeManager;
$this->moduleHandler = $moduleHandler;
$this->messenger = $messenger;
$this->batchBuilder = new BatchBuilder();
$this->config = \Drupal::config('spambot.settings');
}