Exemple #1
0
 /**
  * Constructs a new View 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 \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
  *   Event dispatcher service.
  * @param \Drupal\Core\Session\AccountInterface $current_user
  *   The current user.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, EntityManagerInterface $entity_manager, AccountInterface $current_user)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher, $entity_manager);
     $this->currentUser = $current_user;
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function defaultConfiguration()
 {
     return array('entity_type' => NULL, 'bundle' => NULL) + parent::defaultConfiguration();
 }
Exemple #3
0
 /**
  * {@inheritdoc}
  */
 public function submitConfigurationForm(array &$form, FormStateInterface $form_state)
 {
     parent::submitConfigurationForm($form, $form_state);
     $this->configuration['bundle'] = $this->configuration['bundle']['select'];
 }
Exemple #4
0
 /**
  * {@inheritdoc}
  */
 public function defaultConfiguration()
 {
     return ['upload_location' => 'public://'] + parent::defaultConfiguration();
 }
 /**
  * {@inheritdoc}
  */
 public function defaultConfiguration()
 {
     return ['upload_location' => 'public://', 'dropzone_description' => t('Drop files here to upload them'), 'max_filesize' => file_upload_max_size() / pow(Bytes::KILOBYTE, 2) . 'M', 'extensions' => 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'] + parent::defaultConfiguration();
 }
Exemple #6
0
 /**
  * {@inheritdoc}
  */
 public function defaultConfiguration()
 {
     return ['text' => ''] + parent::defaultConfiguration();
 }