Results
04.03.2024
sector_megamenu 1.0.2 ::
components/megamenu/root/root.twig
{% set nav_link_classes = ['mega-menu__link'] %}
{% set aria_id = (item.title ~ '-mm-' ~ loop.index )|clean_id %}
{% if item.url.options.attributes.class is iterable %}
{% set nav_link_classes = nav_link_classes|merge(item.url.options.attributes.class) %}
{% elseif item.url.options.attributes.class %}
{% set nav_link_classes = nav_link_classes|merge([item.url.options.attributes.class]) %}
{% endif %}
{% if item.below %}
{% set toggle_attributes = toggle_attributes.setAttribute('aria-controls', 'sector-megamenu-body-' ~ aria_id) %}
{% endif %}
{% if item.current %}
{% set link_attributes = link_attributes.setAttribute('aria-current', 'page') %} 04.03.2024
sector_megamenu 1.0.2 ::
components/megamenu/body/subnav.twig
{% set nav_link_classes = ['mega-menu__link'] %}
{% set aria_id = (item.title ~ '-mm-' ~ loop.index )|clean_id %}
{% if item.url.options.attributes.class is iterable %}
{% set nav_link_classes = nav_link_classes|merge(item.url.options.attributes.class) %}
{% elseif item.url.options.attributes.class %}
{% set nav_link_classes = nav_link_classes|merge([item.url.options.attributes.class]) %}
{% endif %}
{% if item.current %}
{% set link_attributes = link_attributes.setAttribute('aria-current', 'page') %}
{% endif %}
<li{{ item.attributes.addClass(nav_item_classes) }}>
{% if item.is_expanded and item.below %} 04.03.2024
sector_megamenu 1.0.2 ::
components/megamenu/body/body.twig
{% set nav_link_classes = ['mega-menu__link', 'mega-menu__heading-link'] %}
{% set aria_id = (item.title ~ '-mm-' ~ loop.index )|clean_id %}
{% if item.url.options.attributes.class is iterable %}
{% set nav_link_classes = nav_link_classes|merge(item.url.options.attributes.class) %}
{% elseif item.url.options.attributes.class %}
{% set nav_link_classes = nav_link_classes|merge([item.url.options.attributes.class]) %}
{% endif %}
{% if item.current %}
{% set link_attributes = link_attributes.setAttribute('aria-current', 'page') %}
{% endif %}
{% if item.below %}
<dialog{{ item.attributes.setAttribute('id', 'sector-megamenu-body-' ~ aria_id).addClass(nav_item_classes) }} tabindex="-1" aria-modal="true" aria-expanded="false" aria-hidden="true"> 03.06.2024
seeds_tailwind 1.0.x-dev ::
templates/navigation/menu.html.twig
{% for item in items %}
{% if item.url.isRouted and item.url.routeName == '<nolink>' %}
{% set menu_item_type = 'nolink' %}
{% elseif item.url.isRouted and item.url.routeName == '<button>' %}
{% set menu_item_type = 'button' %}
{% else %}
{% set menu_item_type = 'link' %}
{% endif %}
{% set item_classes = [ 15.09.2025
seeds_ui 1.0.x-dev ::
templates/navigation/menu.html.twig
{% for item in items %}
{% if item.url.isRouted and item.url.routeName == '<nolink>' %}
{% set menu_item_type = 'nolink' %}
{% elseif item.url.isRouted and item.url.routeName == '<button>' %}
{% set menu_item_type = 'button' %}
{% else %}
{% set menu_item_type = 'link' %}
{% endif %}
{% set item_classes = [ 14.08.2020
service_injector 8.x-1.x-dev ::
src/Constant/CoreServices.php
* @see \Drupal\service_injector\Service\CacheContextUrlSiteServiceTrait */ public const CACHE_CONTEXT_URL_SITE = 'cache_context.url.site'; /** * The Drupal Cache Context URL Path service ID. * * @see \Drupal\Core\Cache\Context\PathCacheContext * @see \Drupal\service_injector\Service\CacheContextUrlPathServiceTrait
* @see \Drupal\service_injector\Service\CacheContextUrlPathServiceTrait */ public const CACHE_CONTEXT_URL_PATH = 'cache_context.url.path'; /** * The Drupal Cache Context URL Path Parent service ID. * * @see \Drupal\Core\Cache\Context\PathParentCacheContext * @see \Drupal\service_injector\Service\CacheContextUrlPathParentServiceTrait
* @see \Drupal\service_injector\Service\CacheContextUrlPathParentServiceTrait */ public const CACHE_CONTEXT_URL_PATH_PARENT = 'cache_context.url.path.parent'; /** * The Drupal Cache Context URL Path Is Front service ID. * * @see \Drupal\Core\Cache\Context\IsFrontPathCacheContext * @see \Drupal\service_injector\Service\CacheContextUrlPathIsFrontServiceTrait
* @see \Drupal\service_injector\Service\CacheContextUrlPathIsFrontServiceTrait */ public const CACHE_CONTEXT_URL_PATH_IS_FRONT = 'cache_context.url.path.is_front'; /** * The Drupal Cache Context URL Query Args service ID. * * @see \Drupal\Core\Cache\Context\QueryArgsCacheContext * @see \Drupal\service_injector\Service\CacheContextUrlQueryArgsServiceTrait
* @see \Drupal\service_injector\Service\CacheContextUrlQueryArgsServiceTrait */ public const CACHE_CONTEXT_URL_QUERY_ARGS = 'cache_context.url.query_args'; /** * The Drupal Cache Context URL Query Args Pagers service ID. * * @see \Drupal\Core\Cache\Context\PagersCacheContext * @see \Drupal\service_injector\Service\CacheContextUrlQueryArgsPagersServiceTrait
* @see \Drupal\service_injector\Service\CacheContextUrlQueryArgsPagersServiceTrait */ public const CACHE_CONTEXT_URL_QUERY_ARGS_PAGERS = 'cache_context.url.query_args.pagers'; /** * The Drupal Cache Context Route service ID. * * @see \Drupal\Core\Cache\Context\RouteCacheContext * @see \Drupal\service_injector\Service\CacheContextRouteServiceTrait
10.08.2022
seven 1.0.0-alpha1 ::
templates/entity-add-list.html.twig
{% for bundle in bundles %}
<li class="clearfix">
<a{{ create_attribute(bundle.add_link.url.options.attributes ?? []) }} href="{{ bundle.add_link.url }}">
<span class="label">{{ bundle.label }}</span>
</a>
<div class="description">{{ bundle.description }}</div>
</li>
{% endfor %}
</ul> 03.03.2025
sgd_dashboard 1.0.0-beta1 ::
templates/sgd-core-data.html.twig
<dd>{{ status.website.client_name.value}}</dd>
<dt>{{ status.website.url.title}}</dt>
<dd>{{ status.website.url.value}}</dd>
<dt>{{ status.website.crontab.title}}</dt>
<dd>{{ status.website.crontab.value}}</dd>
</dl> 03.04.2025
sites_simple_sitemap 1.0.0-alpha4 ::
src/Plugin/simple_sitemap/UrlGenerator/SitesSimpleSitemapEntityUrlGenerator.php
$container->get('router.no_access_checks'),
$container->get('plugin.manager.site'),
$container->get('sites.url.service'),
$container->get('path_alias.manager'),
);
}
/**
* {@inheritdoc} 17.03.2021
social_auth_buttons 1.0.0-beta1 ::
templates/social-auth-buttons-link.html.twig
<a href={{ path(link.url.routeName) }}{{ attributes.addClass('button') }}>{{ link.text }}</a> 09.01.2023
social_auth_modal 1.x-dev ::
templates/block--social-auth-login-modal-block.html.twig
}) %}
<a class="social-auth auth-link social-auth-modal__link" href="{{ social_network.url.toString() }}">
<img{{ image_attributes.addClass('social-auth', 'auth-icon') }}>
</a>
{% endfor %}
{% endif %}
{% endblock %} 04.02.2021
socialbase 1.1.0 ::
templates/file/file-link--card.html.twig
<li class="card-file">
<a class="card-file__link notranslate" href="{{ link.url.uri }}" title="{{ link.text|replace({'_': ' '}) }}" target="_blank">
<span class="card-file__title notranslate">{{ link.text|replace({'_': ' '}) }}</span>
<span class="card-file__type">
<img class="card-file__icon" src="/{{ path_to_socialbase }}/assets/images/mime-icons/icon_1_{{ node_icon }}_x16.png" srcset="/{{ path_to_socialbase }}/assets/images/mime-icons/icon_1_{{ node_icon }}_x32.png 2x" alt="{{ node_icon }}" />
<span class="card-file__size">{{ file_size }}</span>
</span>
</a> 24.05.2024
soundcite 1.1.2 ::
js/build/soundcite.js
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CKEditor5=t():(e.CKEditor5=e.CKEditor5||{},e.CKEditor5.soundcite=t())}(self,()=>(()=>{var e={"ckeditor5/src/core.js":(e,t,i)=>{e.exports=i("dll-reference CKEditor5.dll")("./src/core.js")},"ckeditor5/src/engine.js":(e,t,i)=>{e.exports=i("dll-reference CKEditor5.dll")("./src/engine.js")},"ckeditor5/src/icons.js":(e,t,i)=>{e.exports=i("dll-reference CKEditor5.dll")("./src/icons.js")},"ckeditor5/src/ui.js":(e,t,i)=>{e.exports=i("dll-reference CKEditor5.dll")("./src/ui.js")},"ckeditor5/src/widget.js":(e,t,i)=>{e.exports=i("dll-reference CKEditor5.dll")("./src/widget.js")},"dll-reference CKEditor5.dll":e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(s){var r=t[s];if(void 0!==r)return r.exports;var n=t[s]={exports:{}};return e[s](n,n.exports,i),n.exports}i.d=(e,t)=>{for(var s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s={};return(()=>{"use strict";i.d(s,{default:()=>h});var e=i("ckeditor5/src/core.js"),t=i("ckeditor5/src/widget.js");class r extends e.Command{execute(e){const{model:t}=this.editor;t.change(i=>{t.insertContent(function(e,t){const i=e.createElement("Soundcite",{"data-url":t.url,"data-start":t.start?t.start:0,"data-end":t.end?t.end:null,"data-plays":t.plays?t.plays:1,text:t.text});return i}(i,e))})}refresh(){const{model:e}=this.editor,{selection:t}=e.document,i=e.schema.findAllowedParent(t.getFirstPosition(),"Soundcite");this.isEnabled=null!==i}}class n extends e.Plugin{static get requires(){return[t.Widget]}init(){this._defineSchema(),this._defineConverters(),this.editor.commands.add("insertSoundcite",new r(this.editor))}_defineSchema(){const e=this.editor.model.schema;e.register("Soundcite",{isObject:!0,isInline:!0,allowWhere:"$text",allowAttributes:["data-url","data-start","data-end","data-plays","text"]}),e.addChildCheck((e,t)=>{if(e.endsWith("Soundcite")&&"Soundcite"===t.name)return!1})}_defineConverters(){const{conversion:e}=this.editor;e.for("upcast").elementToElement({model:(e,{writer:t})=>t.createElement("Soundcite",{"data-url":e.getAttribute("data-url"),"data-start":e.getAttribute("data-start"),"data-end":e.getAttribute("data-end"),"data-plays":e.getAttribute("data-plays"),text:e.getChild(0).data}),view:{name:"span",classes:"soundcite"}}),e.for("downcast").elementToElement({model:"Soundcite",view:(e,{writer:i})=>{const s=i.createContainerElement("span",{class:"soundcite","data-url":e.getAttribute("data-url"),"data-start":e.getAttribute("data-start"),"data-end":e.getAttribute("data-end"),"data-plays":e.getAttribute("data-plays")}),r=i.createText(e.getAttribute("text"));return i.insert(i.createPositionAt(s,0),r),(0,t.toWidget)(s,i,{label:"Soundcite widget"})}})}}var o=i("ckeditor5/src/ui.js");var a=i("ckeditor5/src/icons.js");class l extends o.View{constructor(e){super(e),this.url=this._createInput("Url"),this.start=this._createInput("Start"),this.end=this._createInput("End"),this.plays=this._createInput("Plays"),this.text=this._createInput("Link Text"),this.saveButtonView=this._createButton("Save",a.IconCheck,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton("Cancel",a.IconCancel,"ck-button-cancel"),this.cancelButtonView.delegate("execute").to(this,"cancel"),this.childViews=this.createCollection([this.url,this.start,this.end,this.plays,this.text,this.saveButtonView,this.cancelButtonView]),this.setTemplate({tag:"form",attributes:{class:["ck","ck-abbr-Soundcite"],tabindex:"-1"},children:this.childViews})}render(){super.render(),(0,o.submitHandler)({view:this})}focus(){this.childViews.first.focus()}_createInput(e){const t=new o.LabeledFieldView(this.locale,o.createLabeledInputText);return t.label=e,t}_createButton(e,t,i){const s=new o.ButtonView;return s.set({label:e,icon:t,tooltip:!0,class:i}),s}}var d=i("ckeditor5/src/engine.js");class c extends e.Plugin{static get requires(){return[o.ContextualBalloon]}init(){const e=this.editor;this._balloon=this.editor.plugins.get(o.ContextualBalloon),this.formView=this._createFormView(),e.ui.componentFactory.add("Soundcite",t=>{const i=e.commands.get("insertSoundcite"),s=new o.ButtonView(t);return s.set({label:e.t("Soundcite"),icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"/></svg>',tooltip:!0}),s.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(s,"execute",()=>this._showUI()),s}),e.editing.view.addObserver(d.ClickObserver),e.listenTo(e.editing.view.document,"click",(t,i)=>{const s=e.editing.mapper.toModelElement(i.target);"Soundcite"==s.name&&(this.formView.url.fieldView.value=s.getAttribute("data-url"),this.formView.start.fieldView.value=s.getAttribute("data-start"),this.formView.end.fieldView.value=s.getAttribute("data-end"),this.formView.plays.fieldView.value=s.getAttribute("data-plays"),this.formView.text.fieldView.value=s.getAttribute("text"),this._showUI())})}_createFormView(){const e=this.editor,t=new l(e.locale);return this.listenTo(t,"submit",()=>{const i={url:t.url.fieldView.element.value,start:t.start.fieldView.element.value,end:t.end.fieldView.element.value,plays:t.plays.fieldView.element.value,text:t.text.fieldView.element.value};e.execute("insertSoundcite",i),this._hideUI()}),this.listenTo(t,"cancel",()=>{this._hideUI()}),(0,o.clickOutsideHandler)({emitter:t,activator:()=>this._balloon.visibleView===t,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()}),t}_showUI(){this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.focus()}_hideUI(){this.formView.url.fieldView.value="",this.formView.start.fieldView.value="",this.formView.end.fieldView.value="",this.formView.plays.fieldView.value="",this.formView.text.fieldView.value="",this.formView.element.reset(),this._balloon.remove(this.formView),this.editor.editing.view.focus()}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document;let i=null;return i=()=>e.domConverter.viewRangeToDom(t.selection.getFirstRange()),{target:i}}}class u extends e.Plugin{static get requires(){return[n,c]}}const h={Soundcite:u}})(),s=s.default})()); 24.05.2024
soundcite 1.1.2 ::
js/ckeditor5_plugins/soundcite/src/soundciteui.js
if ( modelElement.name == 'Soundcite' ) {
this.formView.url.fieldView.value = modelElement.getAttribute('data-url');
this.formView.start.fieldView.value = modelElement.getAttribute('data-start');
this.formView.end.fieldView.value = modelElement.getAttribute('data-end');
this.formView.plays.fieldView.value = modelElement.getAttribute('data-plays');
this.formView.text.fieldView.value = modelElement.getAttribute('text');
this._showUI();
}
// Grab values from input fields.
const value = {
url: formView.url.fieldView.element.value,
start: formView.start.fieldView.element.value,
end: formView.end.fieldView.element.value,
plays: formView.plays.fieldView.element.value,
text: formView.text.fieldView.element.value
};
editor.execute( 'insertSoundcite', value );
_hideUI() {
// Clear the input field values and reset the form.
this.formView.url.fieldView.value = '';
this.formView.start.fieldView.value = '';
this.formView.end.fieldView.value = '';
this.formView.plays.fieldView.value = '';
this.formView.text.fieldView.value = '';
this.formView.element.reset();
this._balloon.remove( this.formView ); 22.05.2020
sqrl 2.0.0-rc1 ::
js/sqrl.js
.on('click', function () {
Drupal.ajax({
url: drupalSettings.sqrl.url.markup,
error(e) {
Drupal.sqrl.debug(e.toString());
drupalSettings.sqrl.canceled = true;
},
}).execute();
Drupal.sqrl.poll(drupalSettings.sqrl.pollIntervalInitial);
Drupal.sqrl.debug('poll');
Drupal.ajax({
url: drupalSettings.sqrl.url.poll,
error(e) {
Drupal.sqrl.debug(e.toString());
drupalSettings.sqrl.canceled = true;
},
}).execute();
Drupal.sqrl.poll(drupalSettings.sqrl.pollInterval); 22.05.2020
sqrl 2.0.0-rc1 ::
src/Form/SelectAccount.php
$this->state->setAuth($this->nut->getPublicNut(), $form_state->getValue('account'));
$this->sqrl->setNut($this->nut);
$form_state->setRedirectUrl($this->sqrl->getUrl('sqrl.cps.url.login', ['token' => $this->nut->getLoginToken()]));
}
} 22.05.2020
sqrl 2.0.0-rc1 ::
src/Sqrl.php
if ($include_can) {
$query['can'] = $this->base64Encode($this->getPath('sqrl.cps.url.cancel', ['token' => $this->getNut()->getCancelToken()]));
}
if (defined('SQRL_XDEBUG')) {
$query['XDEBUG_SESSION_START'] = 'IDEA';
}
return Url::fromRoute($route, $parameters, [
'absolute' => $absolute, 22.05.2020
sqrl 2.0.0-rc1 ::
src/Client.php
$this->log->debug('Command successful');
$plugin->rememberSuccess();
$this->setResponse('url', $this->sqrl->getPath('sqrl.cps.url.login', ['token' => $this->getNut()->getLoginToken()]));
}
}
catch (\Exception $e) {
if ($e instanceof PluginException) {
$this->tif |= self::FLAG_FUNCTION_NOT_SUPPORTED;
} 22.05.2020
sqrl 2.0.0-rc1 ::
sqrl.routing.yml
type: entity:user
sqrl.cps.url.login:
path: '/sqrl/login/{token}'
defaults:
_controller: '\Drupal\sqrl\Controller\Cps::login'
requirements:
_custom_access: '\Drupal\sqrl\Controller\Cps::accessLogin'
options:
no_cache: TRUE
sqrl.cps.url.cancel:
path: '/sqrl/cancel/{token}'
defaults:
_controller: '\Drupal\sqrl\Controller\Cps::cancel'
requirements:
_custom_access: '\Drupal\sqrl\Controller\Cps::accessCancel'
options: 08.11.2018
stacks 8.x-1.x-dev ::
src/Widget/WidgetFieldHandlers.php
* Returns a link value.
*
* Returns link.title and link.url. Also returns link.html with the render
* array for the full link html.
*
* {{ fields.field_test_link.title }}
* {{ fields.field_test_link.url }}
* {{ fields.field_test_link.html }}
*/ 