You are here

public function CreateArticle::__construct in GraphQL 8.4

CreateArticle constructor.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

Overrides ContextAwarePluginBase::__construct

File

examples/graphql_composable/src/Plugin/GraphQL/DataProducer/CreateArticle.php, line 62

Class

CreateArticle
Creates a new article entity.

Namespace

Drupal\graphql_composable\Plugin\GraphQL\DataProducer

Code

public function __construct(array $configuration, string $plugin_id, array $plugin_definition, AccountInterface $current_user) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $current_user;
}