11<?php
22
3+ use Drupal\webform\WebformInterface;
34use Drupal\Core\Form\FormStateInterface;
45use Drupal\maestro\Engine\MaestroEngine;
56use Drupal\webform\Entity\WebformSubmission;
@@ -26,12 +27,12 @@ function os2forms_forloeb_maestro_interactive_handlers() {
2627 *
2728 * @param array $form
2829 * The array that contains the form.
29- * @param int $queueID
30- * The queueID from Maestro.
3130 * @param object $obj
3231 * References the calling object.
32+ * @param int $queueID
33+ * The queueID from Maestro.
3334 */
34- function os2forms_forloeb_workflow_maestro_reassign_form(&$form, $queueID = 0, $obj ) {
35+ function os2forms_forloeb_workflow_maestro_reassign_form(&$form, $obj, $ queueID = 0) {
3536
3637 $form['reviewer'] = array(
3738 '#id' => 'select_assigned_user',
@@ -66,7 +67,7 @@ function os2forms_forloeb_workflow_maestro_reassign_form_submit(&$form, &$form_s
6667
6768 //Who was selected? Load their username, which is the user attribute that Maestro assigns tasks by.
6869 $reviewer_uid = $form_state->getValue('reviewer');
69- $reviewer = \Drupal\user\Entity\ User::load($reviewer_uid); // pass your uid
70+ $reviewer = User::load($reviewer_uid); // pass your uid
7071 $reviewer_username = $reviewer->getAccountName();
7172
7273 //add that user to our maestro process variable.
@@ -111,7 +112,7 @@ function end_notification_batch_function($processID, $queueID) {
111112 $sid = MaestroEngine::getEntityIdentiferByUniqueID($processID, 'submission');
112113
113114 if ($sid) {
114- $webform_submission = \Drupal\webform\Entity\ WebformSubmission::load($sid);
115+ $webform_submission = WebformSubmission::load($sid);
115116 $webform = $webform_submission->getWebform();
116117 $handlers = $webform->getHandlers();
117118
@@ -130,7 +131,7 @@ function end_notification_batch_function($processID, $queueID) {
130131 * Implements hook_ENTITY_TYPE_create()
131132 * Sets a global purge setting for all webform submissions to 30 days.
132133 */
133- function os2forms_forloeb_webform_create(\Drupal\webform\ WebformInterface $webform) {
134+ function os2forms_forloeb_webform_create(WebformInterface $webform) {
134135 // Set purge of all users submissions.
135136 $webform->setSetting('purge', 'all');
136137 // Set purge of submissions more than 30 days old.
@@ -143,7 +144,7 @@ function os2forms_forloeb_webform_create(\Drupal\webform\WebformInterface $webfo
143144 * Implements hook_ENTITY_TYPE_presave()
144145 * Update webform specific submissions purge settings.
145146 */
146- function os2forms_forloeb_webform_presave(\Drupal\webform\ WebformInterface $webform) {
147+ function os2forms_forloeb_webform_presave(WebformInterface $webform) {
147148 // Add a purge time frame if not set.
148149 if (empty($webform->getSetting('purge_days'))) {
149150 $webform->setSetting('purge_days', 30);
0 commit comments