I have class like this:
<?php
namespace Drupal\mymodule;
use Drupal\comment\CommentInterface;
use Drupal\comment\CommentManagerInterface;
use Drupal\comment\CommentStorage;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Database\Connection;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Language\LanguageManagerInterface;
use Drupal\Core\Session\AccountInterface;
class MyCommentStorage extends CommentStorage {
/**
* {@inheritdoc}
*/
public function __construct(EntityTypeInterface $entity_info, Connection $database, EntityManagerInterface $entity_manager, AccountInterface $current_user, CacheBackendInterface $cache, LanguageManagerInterface $language_manager) {
parent::__construct($entity_info, $database, $entity_manager, $current_user, $cache, $language_manager);
}
}
and my file service:
services:
comment.storage:
class: Drupal\mymodule\MyCommentStorage
arguments: ['@xxx','@database', '@entity.manager', '@current_user', '@cache.entity', '@language_manager']
I don't know add @xxx service to pass first argument in my method construct.I don't find any service implement interface EntityTypeInterface. So what's service I need add to first argument?