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