You are here

protected function WebformName::doEvaluate in RULES WEBFORM 3.x

Same name and namespace in other branches
  1. 8 src/Plugin/Condition/WebformName.php \Drupal\rules_webform\Plugin\Condition\WebformName::doEvaluate()

Comparing id of selected and submitted webform.

If the id of a selected webform (which was selected until a rule creation) is the same as id of submitted webform then return TRUE.

Parameters

int $selected_webform_id: Id of selected webform (which was selected until a rule creation).

array $submitted_webform_info: Array with information about webform submission data (it contains id of the submitted webform).

Return value

bool TRUE if id of the selected webform is the same as id of the submitted webform.

File

src/Plugin/Condition/WebformName.php, line 45

Class

WebformName
Provides a 'Webform has ID' condition.

Namespace

Drupal\rules_webform\Plugin\Condition

Code

protected function doEvaluate($selected_webform_id, array $submitted_webform_info) {
  return $selected_webform_id == $submitted_webform_info['id'];
}