You are here

public function DisqusCommentCount::__construct in Disqus 8

Constructs a 'Disqus Comment Count' view field plugin.

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\Session\AccountInterface $current_user: The current user.

\Drupal\disqus\DisqusCommentManager $disqus_manager: The disqus comment manager object.

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

Overrides HandlerBase::__construct

File

src/Plugin/views/field/DisqusCommentCount.php, line 58

Class

DisqusCommentCount
Field handler to present the number of Disqus comments on a node.

Namespace

Drupal\disqus\Plugin\views\field

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountInterface $current_user, DisqusCommentManager $disqus_manager, ConfigFactoryInterface $config_factory) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $current_user;
  $this->disqusManager = $disqus_manager;
  $this->config = $config_factory
    ->get('disqus.settings');
}