Commit 05f7bded authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Remove obsolete findBySortBy method

parent 0a8d3d61
......@@ -66,45 +66,4 @@ class UserRepository extends Repository
return $query->execute();
}
public function findBySortBy(string $sortby, string $sorting): QueryResultInterface
{
$query = $this->createQuery();
if ($sortby === 'country') {
if ($sorting === 'asc') {
$query->setOrderings([
'country' => QueryInterface::ORDER_ASCENDING,
'last_name' => QueryInterface::ORDER_ASCENDING,
'first_name' => QueryInterface::ORDER_ASCENDING,
'certificates' => QueryInterface::ORDER_ASCENDING
]);
} elseif ($sorting === 'desc') {
$query->setOrderings([
'country' => QueryInterface::ORDER_DESCENDING,
'last_name' => QueryInterface::ORDER_ASCENDING,
'first_name' => QueryInterface::ORDER_ASCENDING,
'certificates' => QueryInterface::ORDER_ASCENDING
]);
}
} elseif ($sortby === 'certificate') {
if ($sorting === 'asc') {
$query->setOrderings([
'certificates' => QueryInterface::ORDER_ASCENDING,
'last_name' => QueryInterface::ORDER_ASCENDING,
'first_name' => QueryInterface::ORDER_ASCENDING,
'country' => QueryInterface::ORDER_ASCENDING
]);
} elseif ($sorting === 'desc') {
$query->setOrderings([
'certificates' => QueryInterface::ORDER_DESCENDING,
'last_name' => QueryInterface::ORDER_ASCENDING,
'first_name' => QueryInterface::ORDER_ASCENDING,
'country' => QueryInterface::ORDER_ASCENDING
]);
}
}
return $query->execute();
}
}
<?php
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'certifications',
'Certlist',
......
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