public function WebformConditionals::componentSet in Webform 7.4
Returns whether a given component has been set by conditional logic.
Assumes that the conditionals have already been executed on the given page.
Parameters
int $cid: The component id of the component whose set state is being sought.
int $page_num: The page number that the component is on.
Return value
bool Whether the component was set based on conditionals.
File
- includes/
webform.webformconditionals.inc, line 606 - Conditional engine to process dependencies within the webform's conditionals.
Class
- WebformConditionals
- Performs analysis and topological sorting on the conditionals.
Code
public function componentSet($cid, $page_num) {
if (!$this->setMap) {
// The conditionals have not yet been executed on a submission.
$this
->executeConditionals(array(), 0);
watchdog('webform', 'WebformConditionals::componentSet called prior to evaluating a submission.', array(), WATCHDOG_ERROR);
}
return isset($this->setMap[$page_num][$cid]) ? $this->setMap[$page_num][$cid] : NULL;
}