[FEATURE] Add distribution management to extension manager
[Packages/TYPO3.CMS.git] / typo3 / sysext / extensionmanager / Classes / Domain / Repository / ExtensionRepository.php
index 1620a40..1f96076 100644 (file)
@@ -194,6 +194,22 @@ class ExtensionRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
                return $query->execute();
        }
 
+       /**
+        * Finds all extensions with category "distribution"
+        *
+        * @return \TYPO3\CMS\Extbase\Persistence\QueryResultInterface
+        */
+       public function findAllDistributions() {
+               $query = $this->createQuery();
+               $query->matching(
+                       $query->logicalAnd(
+                               $query->equals('category', \TYPO3\CMS\Extensionmanager\Domain\Model\Extension::DISTRIBUTION_CATEGORY),
+                               $query->equals('currentVersion', 1)
+                       )
+               );
+               return $query->execute();
+       }
+
        /**
         * Count extensions with a certain key between a given version range
         *