You are here

public function NodeReadTime::__construct in Node read time 8

Constructs a new Node Read Time object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.

\Drupal\node_read_time\Calculate\ReadingTime $reading_time: The node read time service.

Overrides HandlerBase::__construct

File

src/Plugin/views/field/NodeReadTime.php, line 47

Class

NodeReadTime
Field handler to node read time.

Namespace

Drupal\node_read_time\Plugin\views\field

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, ReadingTime $reading_time) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->configManager = $config_factory;
  $this->readingTime = $reading_time;
}