You are here

public function RestfulDataProviderCToolsPlugins::__construct in RESTful 7

Constructs a RestfulDataProviderCToolsPlugins object.

Parameters

array $plugin: Plugin definition.

RestfulAuthenticationManager $auth_manager: (optional) Injected authentication manager.

DrupalCacheInterface $cache_controller: (optional) Injected cache backend.

string $language: (optional) The language to return items in.

Overrides RestfulBase::__construct

File

plugins/restful/RestfulDataProviderCToolsPlugins.php, line 212
Contains \RestfulDataProviderCToolsPlugins

Class

RestfulDataProviderCToolsPlugins
@file Contains \RestfulDataProviderCToolsPlugins

Code

public function __construct(array $plugin, \RestfulAuthenticationManager $auth_manager = NULL, \DrupalCacheInterface $cache_controller = NULL, $language = NULL) {
  parent::__construct($plugin, $auth_manager, $cache_controller, $language);

  // Validate keys exist in the plugin's "data provider options".
  $required_keys = array(
    'module',
    'type',
  );
  $options = $this
    ->processDataProviderOptions($required_keys);
  $this->module = $options['module'];
  $this->type = $options['type'];
  ctools_include('plugins');
}