public function RocketChatChannelBlock::__construct in Rocket.Chat 8.2
Constructs a new AjaxFormBlock.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config Factory
\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: Module handler (what modules are installed).
\Drupal\Core\State\StateInterface $state: State access.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity Manager
\Drupal\Core\Path\CurrentPathStack $currentPath: Current Path handler.
\Drupal\Core\Session\AccountInterface $account:
\Drupal\Core\Logger\LoggerChannelFactory $logger:
Overrides BlockPluginTrait::__construct
File
- modules/
rocket_chat_group/ src/ Plugin/ Block/ RocketChatChannelBlock.php, line 108
Class
- RocketChatChannelBlock
- Provides an example block.
Namespace
Drupal\rocket_chat_group\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, MessengerInterface $messenger, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $moduleHandler, StateInterface $state, EntityTypeManagerInterface $entityTypeManager, CurrentPathStack $currentPath, AccountInterface $account, LoggerChannelFactory $logger) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->messenger = $messenger;
$this->configFactory = $config_factory;
$this->moduleHandler = $moduleHandler;
$this->state = $state;
$this->entityTypeManager = $entityTypeManager;
$this->currentPath = $currentPath;
$this->account = $account;
$this->Logger = $logger
->get("Rocket Chat Group Channel Block");
}