Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
M
my.typo3.org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
t3o
my.typo3.org
Commits
82ab86b6
Commit
82ab86b6
authored
May 21, 2019
by
Stefan Busemann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUGFIX] Update viewhelpers for TYPO3 V9
parent
677e7f94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
+27
-7
extensions/t3o_slack/Classes/ViewHelpers/ShowSlackLinkViewHelper.php
...t3o_slack/Classes/ViewHelpers/ShowSlackLinkViewHelper.php
+14
-4
extensions/t3omy/Classes/Viewhelpers/IsSlackOnlineViewhelper.php
...ons/t3omy/Classes/Viewhelpers/IsSlackOnlineViewhelper.php
+13
-3
No files found.
extensions/t3o_slack/Classes/ViewHelpers/ShowSlackLinkViewHelper.php
View file @
82ab86b6
...
...
@@ -22,12 +22,11 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
/**
* Check if a property of the userprofile is visible in the current context
*
* @param int $frontendUserUID
* @return string
*/
public
function
render
(
int
$frontendUserUID
)
public
function
render
()
{
$feUser
=
$this
->
slackFrontendUserRepository
->
findByUid
(
$
frontendUserUID
);
$feUser
=
$this
->
slackFrontendUserRepository
->
findByUid
(
$
this
->
arguments
[
'frontendUserUID'
]
);
$slackUser
=
$this
->
slackUserRepository
->
findBySlackId
(
$feUser
->
getSlackId
());
if
(
$slackUser
)
{
...
...
@@ -38,7 +37,7 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
}
}
else
{
// @todo render link to register for slack
if
(
$GLOBALS
[
'TSFE'
]
->
fe_user
->
user
[
'uid'
]
==
$
frontendUserUID
)
{
if
(
$GLOBALS
[
'TSFE'
]
->
fe_user
->
user
[
'uid'
]
==
$
this
->
arguments
[
'frontendUserUID'
]
)
{
// @todo add TS configuration
$content
=
'<a href="https://my.typo3.org/?id=23">Get your TYPO3 Slack Account</a>'
;
}
else
{
...
...
@@ -48,4 +47,15 @@ class ShowSlackLinkViewHelper extends AbstractViewHelper
return
$content
;
}
/**
* Initialize
*
* @return void
*/
public
function
initializeArguments
()
{
parent
::
initializeArguments
();
$this
->
registerArgument
(
'frontendUserUID'
,
'integer'
,
'UID of the FrontendUser which should get displayed'
);
}
}
extensions/t3omy/Classes/Viewhelpers/IsSlackOnlineViewhelper.php
View file @
82ab86b6
...
...
@@ -25,12 +25,11 @@ class IsSlackOnlineViewhelper extends AbstractViewHelper
/**
* Checks if the user is online in slack
*
* @param int $frontendUserUID
* @return string
*/
public
function
render
(
$frontendUserUID
)
public
function
render
()
{
$feUser
=
$this
->
slackFrontendUserRepository
->
findByUid
(
$
frontendUserUID
);
$feUser
=
$this
->
slackFrontendUserRepository
->
findByUid
(
$
this
->
arguments
[
'frontendUserUID'
]
);
$slackUser
=
$this
->
slackUserRepository
->
findBySlackId
(
$feUser
->
getSlackId
());
if
(
$slackUser
)
{
...
...
@@ -45,4 +44,15 @@ class IsSlackOnlineViewhelper extends AbstractViewHelper
}
return
$status
;
}
/**
* Initialize
*
* @return void
*/
public
function
initializeArguments
()
{
parent
::
initializeArguments
();
$this
->
registerArgument
(
'frontendUserUID'
,
'integer'
,
'UID of the FrontendUser which should get displayed'
);
}
}
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