You are here

public function CustomFile::init in CiviCRM Entity 8.3

Initialize the plugin.

Parameters

\Drupal\views\ViewExecutable $view: The view object.

\Drupal\views\Plugin\views\display\DisplayPluginBase $display: The display handler.

array $options: The options configured for this plugin.

Overrides FieldPluginBase::init

File

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

Class

CustomFile
Display file link base on CiviCRM.

Namespace

Drupal\civicrm_entity\Plugin\views\field

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
  parent::init($view, $display, $options);
  $this->civicrmApi
    ->civicrmInitialize();
  $this->additional_fields['entity_id'] = 'entity_id';
}