Issue #3112328 by jungle, hash6, xjm: FormatterBase implements ContainerFactoryPluginInterface, so it's not necessary for its child classes to repeat that they do as well

merge-requests/2419/head
xjm 2020-05-04 13:02:41 -05:00
parent 809cfa14a6
commit b28613324a
11 changed files with 11 additions and 22 deletions

View File

@ -8,7 +8,6 @@ use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@ -23,7 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* }
* )
*/
class EntityReferenceEntityFormatter extends EntityReferenceFormatterBase implements ContainerFactoryPluginInterface {
class EntityReferenceEntityFormatter extends EntityReferenceFormatterBase {
/**
* The number of times this formatter allows rendering the same entity.

View File

@ -9,7 +9,6 @@ use Drupal\Core\Field\FieldItemInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@ -27,7 +26,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* }
* )
*/
class StringFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
class StringFormatter extends FormatterBase {
/**
* The entity type manager.

View File

@ -10,7 +10,6 @@ use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
@ -27,7 +26,7 @@ use Symfony\Component\HttpFoundation\Request;
* }
* )
*/
class TimestampAgoFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
class TimestampAgoFormatter extends FormatterBase {
/**
* The date formatter service.

View File

@ -8,7 +8,6 @@ use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@ -24,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* }
* )
*/
class TimestampFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
class TimestampFormatter extends FormatterBase {
/**
* The date formatter service.

View File

@ -12,7 +12,6 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@ -31,7 +30,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* }
* )
*/
class CommentDefaultFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
class CommentDefaultFormatter extends FormatterBase {
/**
* {@inheritdoc}

View File

@ -6,7 +6,6 @@ use Drupal\content_moderation\ModerationInformationInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@ -20,7 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* }
* )
*/
class ContentModerationStateFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
class ContentModerationStateFormatter extends FormatterBase {
/**
* The moderation information service.

View File

@ -9,7 +9,6 @@ use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItem;
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@ -17,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Base class for 'DateTime Field formatter' plugin implementations.
*/
abstract class DateTimeFormatterBase extends FormatterBase implements ContainerFactoryPluginInterface {
abstract class DateTimeFormatterBase extends FormatterBase {
/**
* The date formatter service.

View File

@ -6,7 +6,6 @@ use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Link;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Url;
use Drupal\image\Entity\ImageStyle;
@ -28,7 +27,7 @@ use Drupal\Core\Cache\Cache;
* }
* )
*/
class ImageFormatter extends ImageFormatterBase implements ContainerFactoryPluginInterface {
class ImageFormatter extends ImageFormatterBase {
/**
* The current user.

View File

@ -8,7 +8,6 @@ use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Path\PathValidatorInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Url;
use Drupal\link\LinkItemInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@ -24,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* }
* )
*/
class LinkFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
class LinkFormatter extends FormatterBase {
/**
* The path validator service.

View File

@ -10,7 +10,6 @@ use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Logger\LoggerChannelFactoryInterface;
use Drupal\Core\Messenger\MessengerInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Url;
use Drupal\media\Entity\MediaType;
use Drupal\media\IFrameUrlHelper;
@ -38,7 +37,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* },
* )
*/
class OEmbedFormatter extends FormatterBase implements ContainerFactoryPluginInterface {
class OEmbedFormatter extends FormatterBase {
/**
* The messenger service.

View File

@ -7,7 +7,6 @@ use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Url;
use Drupal\file\FileInterface;
use Drupal\image\Plugin\Field\FieldFormatter\ImageFormatterBase;
@ -30,7 +29,7 @@ use Drupal\Core\Utility\LinkGeneratorInterface;
* }
* )
*/
class ResponsiveImageFormatter extends ImageFormatterBase implements ContainerFactoryPluginInterface {
class ResponsiveImageFormatter extends ImageFormatterBase {
/**
* @var \Drupal\Core\Entity\EntityStorageInterface