Skip to content
Snippets Groups Projects
Commit d1d9b179 authored by Fabian Galinski's avatar Fabian Galinski :pouting_cat:
Browse files

[TASK] Remove compatibility code from a view helper

parent 82fab111
No related branches found
No related tags found
No related merge requests found
......@@ -54,17 +54,7 @@ class ExtendedIfViewHelper extends AbstractConditionViewHelper {
$condition, $or = FALSE, $or2 = FALSE, $or3 = FALSE, $or4 = FALSE,
$and = TRUE, $and2 = TRUE, $and3 = TRUE, $and4 = TRUE, $negate = FALSE
) {
if ($this->evaluateConditionFunctionExists()) {
return parent::render();
}
// @todo Remove the following part if only > 7.5 support.
$conditionResult = ($condition || $or || $or2 || $or3 || $or4) && $and && $and2 && $and3 && $and4;
if ($negate ? !$conditionResult : $conditionResult) {
return $this->renderThenChild();
} else {
return $this->renderElseChild();
}
return parent::render();
}
/**
......@@ -87,16 +77,6 @@ class ExtendedIfViewHelper extends AbstractConditionViewHelper {
return isset($arguments['negate']) && $arguments['negate'] ? !$conditionResult : $conditionResult;
}
/**
* Returns true, if the function evaluateCondition exists in the AbstractConditionViewHelper class.
*
* @deprecated Remove this function if only > 7.5 support.
* @return boolean
*/
protected function evaluateConditionFunctionExists() {
return method_exists('TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper', 'evaluateCondition');
}
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment