Ejemplo n.º 1
0
 /**
  * Constructs a Drupal\Component\Plugin\PluginBase object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Database\Connection $database
  *   Database Service Object.
  * @param \Drupal\node\NodeStorageInterface
  *   The node storage.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database, NodeStorageInterface $node_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->database = $database;
     $this->nodeStorage = $node_storage;
 }
 /**
  * {@inheritdoc}
  */
 public function buildOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::buildOptionsForm($form, $form_state);
     $form['summary']['human'] = ['#title' => $this->t('Display list value as human readable'), '#type' => 'checkbox', '#default_value' => $this->options['summary']['human'], '#states' => ['visible' => [':input[name="options[default_action]"]' => ['value' => 'summary']]]];
 }
Ejemplo n.º 3
0
 /**
  * Constructs a Drupal\file\Plugin\views\argument\Fid object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\Entity\Query\QueryFactory $entity_query
  *   The entity query factory.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, QueryFactory $entity_query)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityManager = $entity_manager;
     $this->entityQuery = $entity_query;
 }
Ejemplo n.º 4
0
 /**
  * Constructs a Drupal\Component\Plugin\PluginBase object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Database\Connection $database
  *   Database Service Object.
  * @param \Drupal\support_ticket\SupportTicketStorageInterface
  *   The support ticket storage.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database, SupportTicketStorageInterface $support_ticket_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->database = $database;
     $this->supportTicketStorage = $support_ticket_storage;
 }
Ejemplo n.º 5
0
 /**
  * Constructs the VocabularyVid object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param VocabularyStorageInterface $vocabulary_storage
  *   The vocabulary storage.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, VocabularyStorageInterface $vocabulary_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->vocabularyStorage = $vocabulary_storage;
 }
Ejemplo n.º 6
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $term_storage)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->termStorage = $term_storage;
 }
Ejemplo n.º 7
0
 /**
  * Constructs a Drupal\Component\Plugin\PluginBase object.
  *
  * @param array $configuration
  *   A configuration array containing information about the plugin instance.
  * @param string $plugin_id
  *   The plugin_id for the plugin instance.
  * @param mixed $plugin_definition
  *   The plugin implementation definition.
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->entityManager = $entity_manager;
 }
  /**
   * {@inheritdoc}
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);

    $this->database = $database;
  }