Commit 89637439 authored by Thomas Löffler's avatar Thomas Löffler

Introduces two helper methods for Version model

parent ba4a575f
Pipeline #3077 passed with stages
in 3 minutes and 53 seconds
......@@ -1173,4 +1173,20 @@ class Version extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
return $supportedTypo3Versions;
}
/**
* @return bool
*/
public function hasTypo3Dependency()
{
return $this->getTypo3Dependency() !== null;
}
/**
* @return bool
*/
public function isLive()
{
return $this->getReviewState() >= 0;
}
}
......@@ -49,7 +49,7 @@ class VersionUtility
public static function doesExtensionSupportTypo3Version(\T3o\TerFe2\Domain\Model\Extension $extension, int $mainVersion): bool
{
foreach ($extension->getVersions() as $version) {
if ($version->getTypo3Dependency() === null || $version->getReviewState() < 0) {
if ($version->hasTypo3Dependency() === false && $version->isLive() === false) {
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment