Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace DADS\Library\ViewHelpers;
- use TYPO3\FLOW3\Annotations as FLOW3;
- /**
- *
- * Show account identifier, aquired through the
- * security context
- *
- * = Examples =
- *
- *
- * <code title="output setting value">
- * <dl:accountidentifier />
- * </code>
- *
- * <output>
- * john_doe
- * </output>
- */
- class AccountIdentifierViewHelper extends \TYPO3\Fluid\Core\ViewHelper\AbstractViewHelper {
- /**
- * @var \TYPO3\FLOW3\Security\Context
- * @FLOW3\Inject
- */
- protected $securityContext;
- /**
- * @return string account identifier
- */
- public function render() {
- return $this->securityContext->getAccount()->getAccountIdentifier();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement