Skip to content
Snippets Groups Projects
Commit b395e408 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Refactoring be module

parent 32542279
No related branches found
No related tags found
No related merge requests found
......@@ -87,8 +87,10 @@ class BackendController extends ActionController {
BackendService::makeButtons($this->docHeaderComponent, $this->request);
$this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());
list($totalJobCount, $jobs) = BackendService::getJobsByPid($pageUid, $filters);
debug($totalJobCount);
// when we are on a siteroot page then display the normal view
if ($pageInfo && (int) $pageInfo['is_siteroot'] === 1) {
if ($totalJobCount) {
// get all jobs
/** @var ObjectStorage $jobs */
$jobs = $this->jobRepository->findJobs($this->rootPageUid, $filters);
......@@ -111,8 +113,7 @@ class BackendController extends ActionController {
$this->view->assign('rootPageUid', $this->rootPageUid);
$this->view->assign('typo3Version', VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version));
} else {
$this->view->assign('pages', BackendService::getPages());
$this->view->assign('rootOptions', BackendService::getRootOptions());
$this->view->assign('pages', BackendService::getPagesWithJobRecords());
}
} catch (\Exception $exception) {
......
......@@ -216,7 +216,7 @@ class BackendService {
* @return array
* @throws \InvalidArgumentException
*/
public static function getUsersByPid($pid, array $filters = []): array {
public static function getJobsByPid($pid, array $filters = []): array {
$pid = (int) $pid;
$tableName = 'fe_users';
/** @var $databaseConnection DatabaseConnection */
......
......@@ -13,7 +13,7 @@
<f:then>
<f:if condition="{pages}">
<f:then>
<f:render partial="SelectRoot" arguments="{pages: rootOptions}" />
<f:render partial="SelectRoot" arguments="{pages: pages}" />
</f:then>
<f:else>
<f:render partial="Filter" arguments="{filters: filters, locationOptions: locationOptions}" />
......
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