[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('active', [Runtime::class, 'isCurrentRouteActive']),
|
||||||
new TwigFunction('is_route', [Runtime::class, 'isCurrentRoute']),
|
new TwigFunction('is_route', [Runtime::class, 'isCurrentRoute']),
|
||||||
new TwigFunction('get_note_actions', [Runtime::class, 'getNoteActions']),
|
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('show_stylesheets', [Runtime::class, 'getShowStylesheets']),
|
||||||
new TwigFunction('handle_event', [Runtime::class, 'handleEvent']),
|
new TwigFunction('handle_event', [Runtime::class, 'handleEvent']),
|
||||||
new TwigFunction('config', [Runtime::class, 'getConfig']),
|
new TwigFunction('config', [Runtime::class, 'getConfig']),
|
||||||
|
@ -68,21 +68,6 @@ class Runtime implements RuntimeExtensionInterface, EventSubscriberInterface
|
|||||||
return $actions;
|
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)
|
public function getConfig(...$args)
|
||||||
{
|
{
|
||||||
return Common::config(...$args);
|
return Common::config(...$args);
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
{{ note.getContent() }}
|
{{ note.getContent() }}
|
||||||
{% endapply %}
|
{% endapply %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<div class="note-other-content">
|
{# <div class="note-other-content"> #}
|
||||||
{% for other in get_note_other_content(note) %}
|
{# {% for other in get_note_other_content(note) %} #}
|
||||||
{% include '/'~ other.name ~ '/view.html.twig' with {'vars': other.vars} only %}
|
{# {% include '/'~ other.name ~ '/view.html.twig' with {'vars': other.vars} only %} #}
|
||||||
{% endfor %}
|
{# {% endfor %} #}
|
||||||
</div>
|
{# </div> #}
|
||||||
{% if hide_attachments is not defined %}
|
{% if hide_attachments is not defined %}
|
||||||
<div class="note-attachments">
|
<div class="note-attachments">
|
||||||
{% for attachment in note.getAttachments() %}
|
{% for attachment in note.getAttachments() %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user