Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
voting.typo3.org
extensions
election
Commits
b3841d10
Commit
b3841d10
authored
Mar 18, 2016
by
Stefan Busemann
Browse files
[TASK] Refactor method chain call to retrieve timestamp
parent
b006310f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Classes/Controller/FeElectionController.php
View file @
b3841d10
...
...
@@ -83,9 +83,7 @@ class FeElectionController extends ActionController
AbstractMessage
::
ERROR
);
$this
->
redirect
(
FeDashboardController
::
ACTION_INDEX
,
FeDashboardController
::
CONTROLLER_NAME
);
}
elseif
(
$electionInvitation
->
getElectionCircular
()
->
getElection
()
->
getEndDate
()
->
getTimestamp
()
<
time
()
)
{
}
elseif
(
$electionInvitation
->
getElectionEndDateAsTimestamp
()
<
time
())
{
$this
->
addFlashMessage
(
LocalizationUtility
::
translate
(
'controller.fe.election.vote.election_finished'
,
'election'
),
LocalizationUtility
::
translate
(
'controller.fe.election.vote.request_failed'
,
'election'
),
...
...
Classes/Domain/Model/ElectionInvitation.php
View file @
b3841d10
...
...
@@ -123,4 +123,12 @@ class ElectionInvitation extends AbstractEntity
{
$this
->
voted
=
$voted
;
}
/**
* @return int
*/
public
function
getElectionEndDateAsTimestamp
()
{
return
$this
->
getElectionCircular
()
->
getElection
()
->
getEndDate
()
->
getTimestamp
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment