Commit 46eefb42 authored by Thomas Löffler's avatar Thomas Löffler

Add class in gravatar viewhelper to use in news and remove unused language menu

parent 7a9a4fb2
......@@ -34,6 +34,7 @@ class GravatarViewHelper extends AbstractViewHelper
parent::initializeArguments();
$this->registerArgument('emailAddress', 'string', 'The email address to use for gravatar', true);
$this->registerArgument('size', 'int', 'The size of the gravatar image');
$this->registerArgument('class', 'string', 'The class for the image', false, 'rounded-circle');
}
/**
......@@ -50,6 +51,6 @@ class GravatarViewHelper extends AbstractViewHelper
$emailAddress = $arguments['emailAddress'];
$size = (int)$arguments['size'] > 0 ? '?s=' . $arguments['size'] : '';
return '<img alt="" class="rounded-circle" src="https://www.gravatar.com/avatar/' . md5(strtolower($emailAddress)) . $size . '" />';
return '<img alt="" class="' . $arguments['class'] . '" src="https://www.gravatar.com/avatar/' . md5(strtolower($emailAddress)) . $size . '" />';
}
}
lib {
newsdetaillangmenu = COA
newsdetaillangmenu {
if.isTrue.data = GP:tx_news_pi1|news
10 = HMENU
10 {
wrap = <ul class="detail-language-menu list-unstyled list-inline">|</ul>
special = language
special {
value = 0,1,2
normalWhenNoLanguage = 0
}
addQueryString = 1
1 = TMENU
1 {
expAll = 0
wrap = |
NO = 1
NO {
stdWrap.cObject = TEXT
stdWrap.cObject {
value = English || German || Spanish
}
allWrap = <li class="list-inline-item">|</li>
}
ACT < .NO
ACT = 1
ACT {
ATagParams = class="active"
doNotLinkIt = 1
allWrap = <li class="active list-inline-item d-none">|</li>
}
CUR < .ACT
USERDEF1 = 1
USERDEF1 {
doNotLinkIt = 1
stdWrap {
cObject = TEXT
cObject.value =
}
}
USERDEF2 = 1
USERDEF2 {
doNotLinkIt = 1
stdWrap {
cObject = TEXT
cObject.value =
}
}
itemArrayProcFunc = T3o\T3olayout\Utility\MenuUtility->checkForRecordTranslations
itemArrayProcFunc.getParameters {
tx_news_pi1.news = tx_news_domain_model_news
}
}
}
}
languageSelector = HMENU
languageSelector {
special = language
special {
value = 0,1,2
normalWhenNoLanguage = 0
}
addQueryString = 1
1 = TMENU
1 {
itemArrayProcFunc = T3o\T3olayout\Utility\CheckMenuUtility->checkForRecordTranslations
itemArrayProcFunc.getParameters {
tx_news_pi1.news = tx_news_domain_model_news
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment