Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_jobs
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_jobs
Commits
d3e2eab5
Commit
d3e2eab5
authored
3 years ago
by
Matthias Adrowski
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] get 8.1 frontend working
parent
9cb13d4a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!35
Feature upgrade to typo3 11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Controller/JoblistController.php
+12
-5
12 additions, 5 deletions
Classes/Controller/JoblistController.php
Classes/Domain/Repository/JobRepository.php
+5
-5
5 additions, 5 deletions
Classes/Domain/Repository/JobRepository.php
with
17 additions
and
10 deletions
Classes/Controller/JoblistController.php
+
12
−
5
View file @
d3e2eab5
...
...
@@ -134,7 +134,9 @@ class JoblistController extends ActionController {
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException
*/
public
function
initializeIndexAction
()
{
$currentPageBrowserPage
=
(
int
)
GeneralUtility
::
_GP
(
'tx_sgjobs_pagebrowser'
)[
'currentPage'
];
$currentPageBrowserPage
=
GeneralUtility
::
_GP
(
'tx_sgjobs_pagebrowser'
)
?
(
int
)
GeneralUtility
::
_GP
(
'tx_sgjobs_pagebrowser'
)[
'currentPage'
]
:
0
;
if
(
$currentPageBrowserPage
>
0
)
{
$this
->
request
->
setArgument
(
'currentPageBrowserPage'
,
$currentPageBrowserPage
);
}
...
...
@@ -151,7 +153,8 @@ class JoblistController extends ActionController {
* @throws ImmediateResponseException
* @throws \TYPO3\CMS\Core\Package\Exception
*/
public
function
indexAction
(
array
$filters
=
[],
int
$jobId
=
NULL
,
int
$currentPageBrowserPage
=
0
):
?
\Psr\Http\Message\ResponseInterface
{
public
function
indexAction
(
array
$filters
=
[],
int
$jobId
=
NULL
,
int
$currentPageBrowserPage
=
0
):
?
\Psr\Http\Message\ResponseInterface
{
if
(
$filters
)
{
$this
->
view
->
assign
(
'selectedCountry'
,
$filters
[
'filterCountry'
]);
$this
->
view
->
assign
(
'selectedCompany'
,
$filters
[
'filterCompany'
]);
...
...
@@ -257,7 +260,8 @@ class JoblistController extends ActionController {
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
*/
public
function
applyFormAction
(
JobApplication
$applyData
=
NULL
,
string
$error
=
''
,
int
$jobId
=
NULL
):
?
\Psr\Http\Message\ResponseInterface
{
public
function
applyFormAction
(
JobApplication
$applyData
=
NULL
,
string
$error
=
''
,
int
$jobId
=
NULL
):
?
\Psr\Http\Message\ResponseInterface
{
if
(
$error
!==
''
)
{
$this
->
view
->
assign
(
'internalError'
,
$error
);
$this
->
request
->
setArgument
(
'error'
,
NULL
);
...
...
@@ -344,7 +348,7 @@ class JoblistController extends ActionController {
// This fixes a bug in the form ViewHelper that wants to serialize a Model with closures in it
$arguments
=
$this
->
request
->
getArguments
();
if
(
$arguments
[
'applyData'
])
{
if
(
isset
(
$arguments
[
'applyData'
])
&&
$arguments
[
'applyData'
])
{
$arguments
[
'applyData'
]
=
(
string
)
$arguments
[
'applyData'
];
$this
->
request
->
setArguments
(
$arguments
);
}
...
...
@@ -368,7 +372,9 @@ class JoblistController extends ActionController {
}
catch
(
NoSuchArgumentException
$exception
)
{
$exceptionMessage
=
'Some file could not be uploaded. Is it too large?'
;
if
(
version_compare
(
\TYPO3\CMS\Core\Utility\VersionNumberUtility
::
getCurrentTypo3Version
(),
'11.0.0'
,
'<'
))
{
if
(
version_compare
(
\TYPO3\CMS\Core\Utility\VersionNumberUtility
::
getCurrentTypo3Version
(),
'11.0.0'
,
'<'
))
{
$this
->
redirect
(
'applyForm'
,
NULL
,
NULL
,
[
'error'
=>
$exceptionMessage
]);
return
NULL
;
}
else
{
...
...
@@ -694,6 +700,7 @@ class JoblistController extends ActionController {
/**
* Build Typo3 11 Response
*
* @param string|NULL $html
* @return \Psr\Http\Message\ResponseInterface
*/
...
...
This diff is collapsed.
Click to expand it.
Classes/Domain/Repository/JobRepository.php
+
5
−
5
View file @
d3e2eab5
...
...
@@ -221,23 +221,23 @@ class JobRepository extends Repository {
}
$constraints
=
[];
if
(
$filters
[
'filterCountry'
]
!==
'0'
&&
$filters
[
'filterCountry'
]
!==
NULL
)
{
if
(
isset
(
$filters
[
'filterCountry'
]
)
&&
$filters
[
'filterCountry'
]
!==
'0'
)
{
$constraints
[]
=
$query
->
equals
(
'company.country'
,
$filters
[
'filterCountry'
]);
}
if
(
$filters
[
'filterRemote'
]
!==
''
&&
$filters
[
'filterRemote'
]
!==
NULL
)
{
if
(
isset
(
$filters
[
'filterRemote'
]
)
&&
$filters
[
'filterRemote'
]
!==
''
)
{
$constraints
[]
=
$query
->
equals
(
'telecommutePossible'
,
TRUE
);
}
if
(
$filters
[
'filterLocation'
]
!==
'0'
&&
$filters
[
'filterLocation'
]
!==
NULL
)
{
if
(
isset
(
$filters
[
'filterLocation'
]
)
&&
$filters
[
'filterLocation'
]
!==
'0'
)
{
$constraints
[]
=
$query
->
equals
(
'company.city'
,
$filters
[
'filterLocation'
]);
}
if
(
$filters
[
'filterDepartment'
]
!==
'0'
&&
$filters
[
'filterDepartment'
]
!==
NULL
)
{
if
(
isset
(
$filters
[
'filterDepartment'
]
)
&&
$filters
[
'filterDepartment'
]
!==
'0'
)
{
$constraints
[]
=
$query
->
equals
(
'department'
,
$filters
[
'filterDepartment'
]);
}
if
(
$filters
[
'filterExperienceLevel'
]
!==
'0'
&&
$filters
[
'filterExperienceLevel'
]
!==
NULL
)
{
if
(
isset
(
$filters
[
'filterExperienceLevel'
]
)
&&
$filters
[
'filterExperienceLevel'
]
!==
'0'
)
{
$constraints
[]
=
$query
->
equals
(
'experienceLevel'
,
$filters
[
'filterExperienceLevel'
]);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment