/**
* @param IComponent
* @return bool
*/
protected function shouldSkip($component)
{
if ($component instanceof Controls\Button) {
return TRUE;
}
if ($this->isValidating() && $this->form->isAnchored() && ($submittedBy = $this->form->isSubmitted()) && $submittedBy instanceof ISubmitterControl) {
$controls = $submittedBy->getValidationScope();
if ($controls === NULL) {
return FALSE;
}
foreach ($controls as $control) {
if ($control === $component) {
return FALSE;
}
if ($control instanceof Container && array_search($component, $control->getComponents(TRUE), TRUE)) {
return FALSE;
}
}
return TRUE;
}
return FALSE;
}