-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/site-sets
- Loading branch information
Showing
4 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
use TYPO3\CMS\Core\Utility\HttpUtility; | ||
use TYPO3\CMS\Core\Utility\MathUtility; | ||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper; | ||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic; | ||
|
||
/* | ||
* This file is part of the TYPO3 CMS project. | ||
|
@@ -28,16 +27,18 @@ | |
* See http://www.gravatar.com | ||
* = Examples = | ||
* <code> | ||
* <blog:gravatar emailAddress="[email protected]" size="40" defaultImageUri="someDefaultImage" /> | ||
* <blog:gravatar emailAddress="[email protected]" | ||
* size="40" | ||
* defaultImageUri="someDefaultImage" | ||
* alt="Gravator icon of {comment.author}" | ||
* data-name="{comment.author}" /> | ||
* </code> | ||
* <output> | ||
* <img src="http://www.gravatar.com/avatar/4a28b782cade3dbcd6e306fa4757849d?d=someDefaultImage&s=40" /> | ||
* </output> | ||
*/ | ||
class GravatarViewHelper extends AbstractTagBasedViewHelper | ||
{ | ||
use CompileWithRenderStatic; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
|
@@ -47,15 +48,11 @@ public function __construct(private readonly UriFactory $uriFactory) | |
parent::__construct(); | ||
} | ||
|
||
/** | ||
* Initialize arguments | ||
*/ | ||
public function initializeArguments(): void | ||
{ | ||
$this->registerUniversalTagAttributes(); | ||
$this->registerArgument('emailAddress', 'string', '', true) | ||
->registerArgument('defaultImageUri', 'string', '', false) | ||
->registerArgument('size', 'int', '', false); | ||
$this->registerArgument('emailAddress', 'string', '', true); | ||
$this->registerArgument('defaultImageUri', 'string', ''); | ||
$this->registerArgument('size', 'int', ''); | ||
} | ||
|
||
public function render(): string | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters