- md5
- 2c54a6bb54bf282138f174b8f123753c
- sha1
- 28029863e388f72e52c191a60f979017607dbf00
- sha256
- f20cf8f6c0cd2963714e45679d4d3f44792c713b4be411519e1273c050b614e1
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
<?php
/**
* @package Joomla.Plugin
* @subpackage Editors.codemirror
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Plugin\Editors\CodeMirror\Extension;
use Joomla\CMS\Event\Editor\EditorSetupEvent;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\Event\DispatcherAwareInterface;
use Joomla\Event\DispatcherAwareTrait;
use Joomla\Event\SubscriberInterface;
use Joomla\Plugin\Editors\CodeMirror\Provider\CodeMirrorProvider;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* CodeMirror Editor Plugin.
*
* @since 1.6
*/
final class Codemirror extends CMSPlugin implements SubscriberInterface, DispatcherAwareInterface
{
use DispatcherAwareTrait;
/**
* Returns an array of events this subscriber will listen to.
*
* @return array
*
* @since 5.0.0
*/
public static function getSubscribedEvents(): array
{
return ['onEditorSetup' => 'onEditorSetup'];
}
/**
* Register Editor instance
*
* @param EditorSetupEvent $event
*
* @return void
*
* @since 5.0.0
*/
public function onEditorSetup(EditorSetupEvent $event)
{
$this->loadLanguage();
$event->getEditorsRegistry()
->add(new CodeMirrorProvider($this->params, $this->getApplication(), $this->getDispatcher()));
}
}
The same content is in 93 releases, Joomla 5.3.0-beta2 to 6.2.1-rc1. See them all, or every version of this file.