first commit
This commit is contained in:
46
plugins/media-action/rotate/form/rotate.xml
Normal file
46
plugins/media-action/rotate/form/rotate.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form>
|
||||
<fieldset name="rotate" label="PLG_MEDIA-ACTION_ROTATE_LABEL">
|
||||
<field
|
||||
name="rotate_quality"
|
||||
type="number"
|
||||
label="PLG_MEDIA-ACTION_ROTATE_QUALITY"
|
||||
addonBefore="PLG_MEDIA-ACTION_ROTATE_QUALITY"
|
||||
min="1"
|
||||
max="100"
|
||||
step="1"
|
||||
default="80"
|
||||
filter="integer"
|
||||
/>
|
||||
|
||||
<field
|
||||
type="spacer"
|
||||
hr="true"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="rotate_a"
|
||||
type="number"
|
||||
label="PLG_MEDIA-ACTION_ROTATE_PARAM_ANGLE"
|
||||
min="0"
|
||||
max="360"
|
||||
step="1"
|
||||
default="0"
|
||||
filter="integer"
|
||||
/>
|
||||
|
||||
<field
|
||||
name="rotate_distinct"
|
||||
type="radio"
|
||||
label="PLG_MEDIA-ACTION_ROTATE_PARAM_BUTTONS"
|
||||
class="btn-group"
|
||||
default=""
|
||||
>
|
||||
<option value="0">0</option>
|
||||
<option value="90">90</option>
|
||||
<option value="180">180</option>
|
||||
<option value="270">270</option>
|
||||
</field>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
22
plugins/media-action/rotate/rotate.xml
Normal file
22
plugins/media-action/rotate/rotate.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extension type="plugin" group="media-action" method="upgrade">
|
||||
<name>plg_media-action_rotate</name>
|
||||
<author>Joomla! Project</author>
|
||||
<creationDate>2017-01</creationDate>
|
||||
<copyright>(C) 2017 Open Source Matters, Inc.</copyright>
|
||||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
|
||||
<authorEmail>admin@joomla.org</authorEmail>
|
||||
<authorUrl>www.joomla.org</authorUrl>
|
||||
<version>4.0.0</version>
|
||||
<description>PLG_MEDIA-ACTION_ROTATE_XML_DESCRIPTION</description>
|
||||
<namespace path="src">Joomla\Plugin\MediaAction\Rotate</namespace>
|
||||
<files>
|
||||
<folder>form</folder>
|
||||
<folder plugin="rotate">services</folder>
|
||||
<folder>src</folder>
|
||||
</files>
|
||||
<languages>
|
||||
<language tag="en-GB">language/en-GB/plg_media-action_rotate.ini</language>
|
||||
<language tag="en-GB">language/en-GB/plg_media-action_rotate.sys.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
46
plugins/media-action/rotate/services/provider.php
Normal file
46
plugins/media-action/rotate/services/provider.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Media-Action.rotate
|
||||
*
|
||||
* @copyright (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
\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 Joomla\Plugin\MediaAction\Rotate\Extension\Rotate;
|
||||
|
||||
return new class () implements ServiceProviderInterface {
|
||||
/**
|
||||
* Registers the service provider with a DI container.
|
||||
*
|
||||
* @param Container $container The DI container.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 4.4.0
|
||||
*/
|
||||
public function register(Container $container): void
|
||||
{
|
||||
$container->set(
|
||||
PluginInterface::class,
|
||||
function (Container $container) {
|
||||
$plugin = new Rotate(
|
||||
$container->get(DispatcherInterface::class),
|
||||
(array) PluginHelper::getPlugin('media-action', 'rotate')
|
||||
);
|
||||
$plugin->setApplication(Factory::getApplication());
|
||||
|
||||
return $plugin;
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
26
plugins/media-action/rotate/src/Extension/Rotate.php
Normal file
26
plugins/media-action/rotate/src/Extension/Rotate.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package Joomla.Plugin
|
||||
* @subpackage Media-Action.rotate
|
||||
*
|
||||
* @copyright (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
namespace Joomla\Plugin\MediaAction\Rotate\Extension;
|
||||
|
||||
use Joomla\Component\Media\Administrator\Plugin\MediaActionPlugin;
|
||||
|
||||
// phpcs:disable PSR1.Files.SideEffects
|
||||
\defined('_JEXEC') or die;
|
||||
// phpcs:enable PSR1.Files.SideEffects
|
||||
|
||||
/**
|
||||
* Media Manager Rotate Action
|
||||
*
|
||||
* @since 4.0.0
|
||||
*/
|
||||
final class Rotate extends MediaActionPlugin
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user