function FormBase::logger
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::logger()
- 10 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::logger()
- 11.x core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::logger()
Gets the logger for a specific channel.
This method exists for backward-compatibility between FormBase and LoggerChannelTrait. Use LoggerChannelTrait::getLogger() instead.
Parameters
string $channel: The name of the channel. Can be any string, but the general practice is to use the name of the subsystem calling this.
Return value
\Psr\Log\LoggerInterface The logger for the given channel.
5 calls to FormBase::logger()
- BlockContentForm::save in core/
modules/ block_content/ src/ BlockContentForm.php - Form submission handler for the 'save' action.
- BlockContentTypeForm::save in core/
modules/ block_content/ src/ BlockContentTypeForm.php - Form submission handler for the 'save' action.
- CommentForm::save in core/
modules/ comment/ src/ CommentForm.php - Form submission handler for the 'save' action.
- MediaForm::save in core/
modules/ media/ src/ MediaForm.php - Form submission handler for the 'save' action.
- WorkspaceForm::save in core/
modules/ workspaces/ src/ Form/ WorkspaceForm.php - Form submission handler for the 'save' action.
File
-
core/
lib/ Drupal/ Core/ Form/ FormBase.php, line 244
Class
- FormBase
- Provides a base class for forms.
Namespace
Drupal\Core\FormCode
protected function logger($channel) {
return $this->getLogger($channel);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.