Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
t3o
my.typo3.org
Commits
741eac60
Commit
741eac60
authored
Jan 18, 2018
by
Stefan Busemann
Browse files
[TASK] Add show action
parent
86de723c
Changes
1
Hide whitespace changes
Inline
Side-by-side
html/typo3conf/ext/t3omy/Classes/Controller/MyProfileController.php
View file @
741eac60
...
...
@@ -4,8 +4,10 @@ declare(strict_types=1);
namespace
T3o\T3omy\Controller
;
use
T3o\T3omy\Domain\Repository\MyProfileRepository
;
use
T3o\T3omy\Domain\Model\MyProfile
;
use
TYPO3\CMS\Extbase\Mvc\Controller\ActionController
;
use
TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
;
use
TYPO3\CMS\Core\Messaging\AbstractMessage
;
/**
* Class UserController
...
...
@@ -38,8 +40,22 @@ class MyProfileController extends ActionController
$this
->
persistenceManager
=
$persistenceManager
;
}
public
function
showAction
()
{
public
function
showAction
(
MyProfile
$user
=
null
)
{
if
(
$user
===
null
)
{
$user
=
$this
->
myProfileRepository
->
findByUid
(
$GLOBALS
[
'TSFE'
]
->
fe_user
->
user
[
'uid'
]
);
if
(
$user
===
null
)
{
$this
->
addFlashMessage
(
'Something went wrong. We were not able to find your profile found!'
,
'Profile can not be shown'
,
AbstractMessage
::
ERROR
);
}
}
\
TYPO3\CMS\Extbase\Utility\DebuggerUtility
::
var_dump
(
$user
,
__FILE__
.
'@'
.
__LINE__
);
$this
->
view
->
assign
(
'user'
,
$user
);
}
public
function
editAction
()
{
...
...
Write
Preview
Supports
Markdown
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