Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new button for {attachments id=xxx } #85

Merged
merged 14 commits into from
Nov 26, 2024
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ all: parts $(ZIPFILE)

INSTALLS = attachments_plugin \
add_attachment_btn_plugin \
insert_attachments_id_token_btn_plugin \
insert_attachments_token_btn_plugin \
attachments_plugin_framework \
attachments_for_content \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ATTACH_ACCESS_THIS_ATTACHMENT_TITLE="Προσπέλασε/κάνε λήψη αυ
ATTACH_ADDED_DATA_FOR_N_ATTACHMENTS="Προστέθηκαν δεδομένα για %d συνημμένα!"
ATTACH_ADDED_ICON_FILENAMES_TO_N_ATTACHMENTS="Προστέθηκαν ονόματα αρχείων εικονιδίων σε %d συνημμένα."
ATTACH_ADD_ATTACHMENT="Προσθήκη συνημμένου"
ATTACH_ADD_ATTACHMENT_IDS="Προσθήκη επιλεγμένων συνημμένων"
ATTACH_ADD_ATTACHMENT_IDS_DESCRIPTION="Αυτή είναι μια λίστα των συνημμένων που έχουν ήδη προστεθεί στο άρθρο/κατηγορία. Επιλέξτε αυτό(ά) που θέλετε να προσθέσετε χρησιμοποιώντας την ένδειξη και πατήστε το κουμπί 'Προσθήκη επιλεγμένων συνημμένων'."
ATTACH_ADD_ATTACHMENT_TITLE="Πρόσθεσε συνημμένο σε αυτό το άρθρο ή αντικείμενο περιεχομένου"
ATTACH_ADD_ATTACHMENT_TO_S_INSTEAD_OF_S_TOOLTIP="Πρόσθεσε το συνημμένο σε %s (αντί για %s)"
ATTACH_ADD_URL="Προσθήκη URL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ATTACH_ACCESS_THIS_ATTACHMENT_TITLE="Access/download this attachment"
ATTACH_ADDED_DATA_FOR_N_ATTACHMENTS="Added data for %d attachments!"
ATTACH_ADDED_ICON_FILENAMES_TO_N_ATTACHMENTS="Added icon filenames to %d attachment(s)."
ATTACH_ADD_ATTACHMENT="Add attachment"
ATTACH_ADD_ATTACHMENT_IDS="Add selected attachments"
ATTACH_ADD_ATTACHMENT_IDS_DESCRIPTION="This is a list of attachments already added the the article/category. Select which one(s) you want to insert using the token and press the 'Add selected attachments' button."
ATTACH_ADD_ATTACHMENT_TITLE="Add attachment to this article or content item"
ATTACH_ADD_ATTACHMENT_TO_S_INSTEAD_OF_S_TOOLTIP="Add the attachment to a %s (instead of %s)"
ATTACH_ADD_URL="Add URL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ATTACH_ACCESS_THIS_ATTACHMENT_TITLE="Voir/télécharger cette pièce jointe"
ATTACH_ADDED_DATA_FOR_N_ATTACHMENTS="Donnée ajoutée pour %d pièces jointes!"
ATTACH_ADDED_ICON_FILENAMES_TO_N_ATTACHMENTS="Icône ajoutée à %d pièce(s)-jointe(s)."
ATTACH_ADD_ATTACHMENT="Ajouter une pièce jointe"
ATTACH_ADD_ATTACHMENT_IDS="Ajoute la(les) pièces jointe(s) sélectionnée(s)"
ATTACH_ADD_ATTACHMENT_IDS_DESCRIPTION="Si desssous vous avez la liste des pièces jointes déjà ajoutées à l'article/la catégorie. Selectionnez celle(s) qu vous voulez ajouter avec le token et apputer sur le bouton 'Ajoute la(les) pièces jointe(s) sélectionnée(s)'."
ATTACH_ADD_ATTACHMENT_TITLE="Ajouter la pièce jointe à l'article ou au contenu"
ATTACH_ADD_ATTACHMENT_TO_S_INSTEAD_OF_S_TOOLTIP="Ajouter la pièce jointe à un %s (Au lieu de %s)"
ATTACH_ADD_URL="Ajouter l'adresse"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ ATTACH_PACKAGE_ATTACHMENTS_FOR_JOOMLA_16PLUS="Attachments pour Joomla 2.5+"
ATTACH_PLEASE_REPORT_BUGS_AND_SUGGESTIONS_TO_S="Merci de signaler les bugs et vos suggestions à %s"
COM_ATTACHMENTS="Attachments"
COM_ATTACHMENTS_CONFIGURATION="Configuration du composant Attachments"
ATTACH_PACKAGE_NOTICE_UNINSTALL_PACKAGE_S="Pou désinstaller l'extension 'Attachments, désinstaller le Package '%s'!"
7 changes: 6 additions & 1 deletion attachments_component/admin/src/Model/AttachmentsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function __construct($config = array())
if (empty($config['filter_fields'])) {
$config['filter_fields'] = array(
'id',
'parent_id',
'a.state',
'a.access',
'a.filename',
Expand Down Expand Up @@ -80,7 +81,11 @@ protected function getListQuery()
/** @var \Joomla\Database\DatabaseDriver $db */
$db = Factory::getContainer()->get('DatabaseDriver');
$query = $db->getQuery(true);

$id = $this->getState('filter.parent_id');
if (is_numeric($id))
{
$query->where('a.parent_id = ' . (int) $id);
}
$query->select('a.*, a.id as id');
$query->from('#__attachments as a');

Expand Down
26 changes: 24 additions & 2 deletions attachments_component/admin/src/View/Attachments/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use JMCameron\Component\Attachments\Administrator\Helper\AttachmentsPermissions;
use JMCameron\Component\Attachments\Site\Helper\AttachmentsDefines;
use JMCameron\Plugin\AttachmentsPluginFramework\AttachmentsPluginManager;
use JMCameron\Component\Attachments\Administrator\Model\AttachmentsModel;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
Expand Down Expand Up @@ -52,10 +53,18 @@ public function display($tpl = null)
return;
}

$app = Factory::getApplication();
$jinput = $app->getInput();
$this->editor = $jinput->getString('editor', null);
$id = $jinput->getInt('parent_id', null);
if ($id) {
$model = $this->getModel();
$model->setState('filter.parent_id', $id);
}
$this->items = $this->get('Items');
$this->state = $this->get('State');
$this->pagination = $this->get('Pagination');

// Check for errors.
if (count($errors = $this->get('Errors'))) {
throw new \Exception(implode("\n", $errors) . ' (ERR 175)', 500);
Expand Down Expand Up @@ -166,9 +175,22 @@ public function display($tpl = null)
}

// Set the toolbar
$this->addToolBar();
if ( !$this->editor ) {
$this->addToolBar();
}

// Display the attachments
if ( $this->editor ) {
$document = Factory::getDocument();
HTMLHelper::_('jquery.framework');
$document->addScriptDeclaration('function insertAttachmentsIdToken($, editorName) {
let editor = parent.Joomla.editors.instances[editorName];
var adminform = document.getElementById("adminForm");
var Data = new FormData(adminform);
editor.replaceSelection("{attachments id=" + Data.getAll("cid[]") +"}");
$(".btn-close", parent.document).click();
}');
}
parent::display($tpl);
}

Expand Down
14 changes: 13 additions & 1 deletion attachments_component/admin/tmpl/attachments/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;


// No direct access
defined('_JEXEC') or die('Restricted access');

Expand All @@ -31,7 +33,15 @@

?>
<form action="<?php echo Route::_('index.php?option=com_attachments'); ?>" method="post" name="adminForm" id="adminForm">
<?php echo $this->loadTemplate('filter');?>
<?php if ( $this->editor ) : ?>
<p><?php echo Text::_('ATTACH_ADD_ATTACHMENT_IDS_DESCRIPTION'); ?></p>
<button onclick="insertAttachmentsIdToken(jQuery, '<?php echo $this->editor ?>');"><?php echo Text::_('ATTACH_ADD_ATTACHMENT_IDS'); ?></button>
<?php endif; ?>
<?php
if (!$this->editor ) {
echo $this->loadTemplate('filter');
}
?>
<table class="adminlist" id="attachmentsList">
<thead><?php echo $this->loadTemplate('head');?></thead>
<tbody><?php echo $this->loadTemplate('body');?></tbody>
Expand All @@ -44,5 +54,7 @@
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
<?php echo HTMLHelper::_('form.token'); ?>
</div>

</form>


14 changes: 11 additions & 3 deletions attachments_component/admin/tmpl/attachments/default_body.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@
?>
<tr class="<?php echo "row$k"; ?>">
<td class="at_checked hidden-phone"><?php echo $checked; ?></td>
<?php if ( !$this->editor ) : ?>
<td class="at_published" align="center"><?php echo $published;?></td>
<?php endif; ?>
<td class="at_filename">
<a href="<?php echo $link; ?>" title="<?php echo $edit_attachment_title; ?>"
><?php echo HTMLHelper::image('com_attachments/file_icons/'.$icon, $download_verb, null, true);
<?php if ( !$this->editor ) : ?>
<a href="<?php echo $link; ?>" title="<?php echo $edit_attachment_title; ?>" >
<?php endif; ?>
<?php echo HTMLHelper::image('com_attachments/file_icons/'.$icon, $download_verb, null, true);
if ( ($item->uri_type == 'url') && $superimpose_link_icons ) {
if ( $item->url_valid ) {
echo HTMLHelper::image('com_attachments/file_icons/link_arrow.png', '', 'class="link_overlay"', true);
Expand All @@ -127,7 +131,11 @@
echo HTMLHelper::image('com_attachments/file_icons/link_broken.png', '', 'class="link_overlay"', true);
}
}
?></a>&nbsp;<a
?>
<?php if ( !$this->editor ) : ?>
</a>
<?php endif; ?>
&nbsp;<a
href="<?php echo $link; ?>" title="<?php echo $edit_attachment_title; ?>"
><?php if ( $item->uri_type == 'file' ) {
echo $item->filename;
Expand Down
2 changes: 2 additions & 0 deletions attachments_component/admin/tmpl/attachments/default_head.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@
<th class="at_checked hidden-phone">
<input type="checkbox" name="checkall-toggle" value="" onclick="Joomla.checkAll(this)" />
</th>
<?php if ( !$this->editor ) : ?>
<th class="at_published" width="5%" nowrap="nowrap"><?php echo HTMLHelper::_('grid.sort', 'ATTACH_PUBLISHED',
'a.state', $listDirn, $listOrder ) ?></th>
<?php endif; ?>
<th class="at_filename"><?php echo HTMLHelper::_('grid.sort', 'ATTACH_ATTACHMENT_FILENAME_URL',
'a.filename', $listDirn, $listOrder ) ?></th>
<th class="at_description"><?php echo HTMLHelper::_('grid.sort', 'ATTACH_DESCRIPTION',
Expand Down
1 change: 1 addition & 0 deletions attachments_component/install.attachments.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class com_AttachmentsInstallerScript implements InstallerScriptInterface
'plg_attachments_plugin_framework',
'plg_attachments_for_content',
'plg_editors-xtd_add_attachment_btn',
'plg_editors-xtd_insert_attachments_id_token_btn',
'plg_editors-xtd_insert_attachments_token_btn',
'plg_system_show_attachments_in_editor',
'plg_quickicon_attachments'
Expand Down
4 changes: 2 additions & 2 deletions attachments_component/site/src/Model/AttachmentsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function &getAttachmentsList($attachmentid=null)
$parent_id = $this->getParentId();
$parent_type = $this->getParentType();
$parent_entity = $this->getParentEntity();

parapente marked this conversation as resolved.
Show resolved Hide resolved
// Use parent entity corresponding to values saved in the attachments table
$parent = $this->getParentClass();

Expand Down Expand Up @@ -398,7 +398,7 @@ public function &getAttachmentsList($attachmentid=null)
}
else {
$query->where('a.parent_id='.(int)$parent_id);

// Handle the state part of the query
if ( $user->authorise('core.edit.state', 'com_attachments') ) {
// Do not filter on state since this user can change the state of any attachment
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" group="editors-xtd" version="4.0" method="upgrade">
<name>plg_editors-xtd_insert_attachments_id_token_btn</name>
<version>4.0.4</version>
<creationDate>November 9, 2024</creationDate>
<author>Jonathan M. Cameron</author>
<copyright>(C) 2007-2024 Jonathan M. Cameron. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license>
<authorEmail>jmcameron@jmcameron.net</authorEmail>
<authorUrl>https://github.com/jmcameron/attachments/</authorUrl>
<description>ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION</description>
<namespace path="src">JMCameron\Plugin\EditorsXtd\InsertAttachmentsIdToken</namespace>
<files>
<folder>src</folder>
<folder plugin="insert_attachments_id_token">services</folder>
</files>
<languages>
<language tag="en-GB">language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.ini</language>
<language tag="en-GB">language/en-GB/en-GB.plg_editors-xtd_insert_attachments_id_token.sys.ini</language>
<language tag="el-GR">language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.ini</language>
<language tag="el-GR">language/el-GR/el-GR.plg_editors-xtd_insert_attachments_id_token.sys.ini</language>
<language tag="fr-FR">language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.ini</language>
<language tag="fr-FR">language/fr-FR/fr-FR.plg_editors-xtd_insert_attachments_id_token.sys.ini</language>
</languages>
</extension>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
; el-GR.plg_editors-xtd_add_attachment.ini
; Attachments for Joomla! extension
; Copyright (C) 2007-2024 Jonathan M. Cameron, All rights reserved.
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
; Note : All ini files need to be saved as UTF-8 - No BOM

; Greek translation

; NOTE TO TRANSLATORS:
; Do not translate the '{attachments}' part of any of the right-hand
; strings below! It must appear exactly as '{attachments}' in the
; article/parent text in order for the substitutions to work correctly in
; 'custom placement' mode.!

INSERT_ATTACHMENTS_ID_TOKEN="Εισαγωγή ένδειξης {attachments id=xxx}"
INSERT_ATTACHMENTS_ID_TOKEN_DESCRIPTION="Τοποθετήστε στον δρομέα στο σημείο που θέλετε να εμφανιστεί η λίστα των συνημμένων (στο front end) και πατήστε αυτό το κουμπί. Αυτό εισάγει την ένδειξη {attachments} που χρησιμοποιεί η επιλογή 'Προσαρμοσμένη Τοποθέτηση'. Θα προστεθεί κάποια επιπλέον HTML για να κρύψει την ένδειξη όταν οι λίστες συνημμένων δεν εμφανίζονται."
ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Το πρόσθετο εισαγωγής ένδειξης προσθέτει ένα κουμπί που σας επιτρέπει να εισάγετε μια ένδειξη προσαρμοσμένης τοποθέτησης {attachments id=xxx} κατά την επεξεργασία άρθρων ή κατηγοριών."
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
; el-GR.plg_editors-xtd_add_attachment.sys.ini
; Attachments for Joomla! extension
; Copyright (C) 2007-2018 Jonathan M. Cameron, All rights reserved.
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
; Note : All ini files need to be saved as UTF-8 - No BOM

; English translation

; NOTE TO TRANSLATORS:
; Do not translate the '{attachments}' part of any of the right-hand
; strings below! It must appear exactly as '{attachments}' in the
; article/parent text in order for the substitutions to work correctly in
; 'custom placement' mode.!

ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Το πρόσθετο εισαγωγής ένδειξης προσθέτει ένα κουμπί που σας επιτρέπει να εισάγετε μια ένδειξη προσαρμοσμένης τοποθέτησης {attachments id=xxx} κατά την επεξεργασία άρθρων ή κατηγοριών."
PLG_EDITORS-XTD_INSERT_ATTACHMENTS_ID_TOKEN_BTN="Κουμπί - Εισαγωγή Ένδειξης Συνημμένων Με Αναγνωριστικό"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
; en-GB.plg_editors-xtd_add_attachment.ini
; Attachments for Joomla! extension
; Copyright (C) 2007-2018 Jonathan M. Cameron, All rights reserved.
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
; Note : All ini files need to be saved as UTF-8 - No BOM

; English translation

; NOTE TO TRANSLATORS:
; Do not translate the '{attachments}' part of any of the right-hand
; strings below! It must appear exactly as '{attachments}' in the
; article/parent text in order for the substitutions to work correctly in
; 'custom placement' mode.!

INSERT_ATTACHMENTS_ID_TOKEN="Insert {attachments id=xxx} token"
INSERT_ATTACHMENTS_ID_TOKEN_DESCRIPTION="Place the cursor in the location where you want the attachments list to display (in the front end) and then click on this button. This inserts the {attachments} token that the 'Custom Placement' option uses. Some HTML is also added to hide the token when attachments lists are not shown."
ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="The insert attachments token plugin adds a button that allows you to insert an {attachments id=xxx} custom placement token while editing articles or categories."
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
; en-GB.plg_editors-xtd_add_attachment.sys.ini
; Attachments for Joomla! extension
; Copyright (C) 2007-2018 Jonathan M. Cameron, All rights reserved.
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
; Note : All ini files need to be saved as UTF-8 - No BOM

; English translation

; NOTE TO TRANSLATORS:
; Do not translate the '{attachments}' part of any of the right-hand
; strings below! It must appear exactly as '{attachments}' in the
; article/parent text in order for the substitutions to work correctly in
; 'custom placement' mode.!

ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="The insert attachments token plugin adds a button that allows you to insert an {attachments id=xxx} custom placement token while editing articles or categories."
PLG_EDITORS-XTD_INSERT_ATTACHMENTS_ID_TOKEN_BTN="Editor Button - Insert Attachments ID Token"
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
; fr-FR.plg_editors-xtd_add_attachment.ini
; Attachments for Joomla! extension
; Copyright (C) 2007-2018 Jonathan M. Cameron, All rights reserved.
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
; Note : All ini files need to be saved as UTF-8 - No BOM

; French translation by: Marc-André Ladouceur (2.0), Pascal Adalian and Sylvain Faivre

; NOTE TO TRANSLATORS:
; Do not translate the '{attachments}' part of any of the right-hand
; strings below! It must appear exactly as '{attachments}' in the
; article/parent text in order for the substitutions to work correctly in
; 'custom placement' mode.!

ATTACH_ATTACHMENTS_ID_TOKEN="Inserer le symbole {attachments id=xxx}"
ATTACH_ATTACHMENTS_ID_TOKEN_DESCRIPTION="Placer le curseur à l'endroit où vous voulez la liste des pièces jointes à afficher (dans le front-end) et ensuite cliquez sur ce bouton. Ceci insert le symbole {attachments} qui utilise l'option 'Emplacement personnalisé'. Un peu de HTML est aussi ajouté pour cacher le symbole quand les listes de pièces jointes ne sont pas affichées."
ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Ajoute un bouton qui vous permet d'insérer un symbole d'emplacement personnalisé {attachments id=xxx} pendant la modification."
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
; fr-FR.plg_editors-xtd_add_attachment.sys.ini
; Attachments for Joomla! extension
; Copyright (C) 2007-2018 Jonathan M. Cameron, All rights reserved.
; License http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
; Note : All ini files need to be saved as UTF-8 - No BOM

; French translation by: Marc-André Ladouceur (2.0), Pascal Adalian and Sylvain Faivre

; NOTE TO TRANSLATORS:
; Do not translate the '{attachments}' part of any of the right-hand
; strings below! It must appear exactly as '{attachments}' in the
; article/parent text in order for the substitutions to work correctly in
; 'custom placement' mode.!

ATTACH_INSERT_ATTACHMENTS_ID_TOKEN_BUTTON_PLUGIN_DESCRIPTION="Ajoute un bouton qui vous permet d'insérer un symbole d'emplacement personnalisé {attachments id=xxx} pendant la modification."
PLG_EDITORS-XTD_INSERT_ATTACHMENTS_ID_TOKEN_BTN="Bouton Editer - Insére un symbole Pièces jointes (id)"
39 changes: 39 additions & 0 deletions insert_attachments_id_token_btn_plugin/services/provider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

\defined('_JEXEC') or die;

use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use JMCameron\Plugin\EditorsXtd\InsertAttachmentsIdToken\Extension\InsertAttachmentsIdToken;

return new class () implements ServiceProviderInterface {
/**
* Registers the service provider with a DI container.
*
* @param Container $container The DI container.
*
* @return void
*
* @since 4.3.0
*/
public function register(Container $container)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$dispatcher = $container->get(DispatcherInterface::class);
$plugin = new InsertAttachmentsIdToken(
$dispatcher,
(array) PluginHelper::getPlugin('editors-xtd', 'insert_attachments_id_token')
);
$plugin->setApplication(Factory::getApplication());

return $plugin;
}
);
}
};
Loading