You are here

public function ReadingTime::__construct in Node read time 8

Class constructor.

Parameters

Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: EntityTypeManager object.

Drupal\Core\Config\ConfigFactoryInterface $configFactory: ConfigFactory object.

File

src/Calculate/ReadingTime.php, line 65

Class

ReadingTime
Calculates the reading time of a node.

Namespace

Drupal\node_read_time\Calculate

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, ConfigFactoryInterface $configFactory) {
  $this->entityTypeManager = $entityTypeManager;
  $this->configFactory = $configFactory;
  $this->config = $configFactory
    ->get('node_read_time.settings');
}