You are here

protected function YamlFormSubmissionDevelGenerate::initializeGenerate in YAML Form 8

Add 'users' that contains a list of uids.

Parameters

array $values: The element values from the settings form.

1 call to YamlFormSubmissionDevelGenerate::initializeGenerate()
YamlFormSubmissionDevelGenerate::generateSubmissions in src/Plugin/DevelGenerate/YamlFormSubmissionDevelGenerate.php
Generates submissions for a list of given forms.

File

src/Plugin/DevelGenerate/YamlFormSubmissionDevelGenerate.php, line 242

Class

YamlFormSubmissionDevelGenerate
Provides a YamlFormSubmissionDevelGenerate plugin.

Namespace

Drupal\yamlform\Plugin\DevelGenerate

Code

protected function initializeGenerate(array &$values) {

  // Set user id.
  $users = $this
    ->getUsers();
  $users = array_merge($users, [
    '0',
  ]);
  $values['users'] = $users;

  // Set created min and max.
  $values['created_min'] = strtotime('-1 month');
  $values['created_max'] = time();
}