You are here

public function ContactSubtype::__construct in CiviCRM Entity 8.3

Constructs a new ContactSubtype instance.

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\AccountProxy: The current user.

Drupal\civicrm_entity\CiviCrmApiInterface $civicrmApi: The CiviCRM Api.

Overrides PluginBase::__construct

File

src/Plugin/views/argument_default/ContactSubtype.php, line 53

Class

ContactSubtype
Default argument plugin to extract the current user's civicrm contact subtype

Namespace

Drupal\civicrm_entity\Plugin\views\argument_default

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountProxy $currentUser, CiviCrmApiInterface $civicrmApi) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $currentUser;
  $this->civicrmApi = $civicrmApi;
}