You are here

protected function FormBase::logger in Drupal 8

Same name and namespace in other branches
  1. 9 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 248

Class

FormBase
Provides a base class for forms.

Namespace

Drupal\Core\Form

Code

protected function logger($channel) {
  return $this
    ->getLogger($channel);
}