コード例 #1
0
ファイル: UserStorage.php プロジェクト: anatalsceo/en-classe
 /**
  * Constructs a new UserStorage object.
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
  *   The entity type definition.
  * @param \Drupal\Core\Database\Connection $database
  *   The database connection to be used.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
  *   Cache backend instance to use.
  * @param \Drupal\Core\Password\PasswordInterface $password
  *   The password hashing service.
  */
 public function __construct(EntityTypeInterface $entity_type, Connection $database, EntityManagerInterface $entity_manager, CacheBackendInterface $cache, PasswordInterface $password)
 {
     parent::__construct($entity_type, $database, $entity_manager, $cache);
     $this->password = $password;
 }
コード例 #2
0
 /**
  * Constructs a CommentStorage object.
  *
  * @param \Drupal\Core\Entity\EntityTypeInterface $entity_info
  *   An array of entity info for the entity type.
  * @param \Drupal\Core\Database\Connection $database
  *   The database connection to be used.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
  *   Cache backend instance to use.
  * @param \Drupal\comment\CommentStatisticsInterface $comment_statistics
  *   The comment statistics service.
  * @param \Drupal\Core\Session\AccountInterface $current_user
  *   The current user.
  */
 public function __construct(EntityTypeInterface $entity_info, Connection $database, EntityManagerInterface $entity_manager, CommentStatisticsInterface $comment_statistics, AccountInterface $current_user, CacheBackendInterface $cache)
 {
     parent::__construct($entity_info, $database, $entity_manager, $cache);
     $this->statistics = $comment_statistics;
     $this->currentUser = $current_user;
 }