public static function SettingsForm::processItem in Opigno Moxtra 8
Same name and namespace in other branches
- 3.x src/Form/SettingsForm.php \Drupal\opigno_moxtra\Form\SettingsForm::processItem()
Process item of batch.
Parameters
array $data: The mail of new user. Master user.
array $context: Context.
File
- src/
Form/ SettingsForm.php, line 304
Class
- SettingsForm
- Implements the Opigno Moxtra settings form.
Namespace
Drupal\opigno_moxtra\FormCode
public static function processItem($item, array &$context) {
$moxtra = \Drupal::service('opigno_moxtra.moxtra_api');
if (empty($context['results'])) {
$context['results'] = [];
}
if (!empty($item->uid)) {
$account = User::load($item->uid);
$moxtra
->setUser($account);
}
$context['results'][] = $item->uid;
}