forked from GNUsocial/gnu-social
[TWIG] Remove unused Twig function 'get_note_other_content'
This commit is contained in:
parent
f0c6aa761b
commit
6591d78a9c
@ -54,7 +54,6 @@ class Extension extends AbstractExtension
|
||||
new TwigFunction('active', [Runtime::class, 'isCurrentRouteActive']),
|
||||
new TwigFunction('is_route', [Runtime::class, 'isCurrentRoute']),
|
||||
new TwigFunction('get_note_actions', [Runtime::class, 'getNoteActions']),
|
||||
new TwigFunction('get_note_other_content', [Runtime::class, 'getNoteOtherContent']),
|
||||
new TwigFunction('show_stylesheets', [Runtime::class, 'getShowStylesheets']),
|
||||
new TwigFunction('handle_event', [Runtime::class, 'handleEvent']),
|
||||
new TwigFunction('config', [Runtime::class, 'getConfig']),
|
||||
|
@ -68,21 +68,6 @@ class Runtime implements RuntimeExtensionInterface, EventSubscriberInterface
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* get extra note content
|
||||
*
|
||||
* @param Note $note
|
||||
*
|
||||
* @return array|mixed note content
|
||||
*/
|
||||
public function getNoteOtherContent(Note $note)
|
||||
{
|
||||
$other = [];
|
||||
Event::handle('show_note_content', [$this->request, $note, &$other]);
|
||||
|
||||
return $other;
|
||||
}
|
||||
|
||||
public function getConfig(...$args)
|
||||
{
|
||||
return Common::config(...$args);
|
||||
|
@ -16,11 +16,11 @@
|
||||
{{ note.getContent() }}
|
||||
{% endapply %}
|
||||
{% endblock %}
|
||||
<div class="note-other-content">
|
||||
{% for other in get_note_other_content(note) %}
|
||||
{% include '/'~ other.name ~ '/view.html.twig' with {'vars': other.vars} only %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{# <div class="note-other-content"> #}
|
||||
{# {% for other in get_note_other_content(note) %} #}
|
||||
{# {% include '/'~ other.name ~ '/view.html.twig' with {'vars': other.vars} only %} #}
|
||||
{# {% endfor %} #}
|
||||
{# </div> #}
|
||||
{% if hide_attachments is not defined %}
|
||||
<div class="note-attachments">
|
||||
{% for attachment in note.getAttachments() %}
|
||||
|
Loading…
Reference in New Issue
Block a user