CoreFiles by mySites.guru
crop.php49 lines, 1,057 bytes, from Joomla_4.2.0-Stable-Full_Package.zip
Raw History Compare with 4.1.5
md5
b82ffd7cb8b24ace24c4764a5f462bd8
sha1
892d7b567ec3b07fff6af5f62e4e91f2be7e7b1e
sha256
05e347310b39018cb8d71a338688408fcae98b1b61fb77f8ceae93cbefdc523b
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Media-Action.crop
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt

 * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
 */

use Joomla\CMS\Factory;

/**
 * Media Manager Crop Action
 *
 * @since  4.0.0
 */
class PlgMediaActionCrop extends \Joomla\Component\Media\Administrator\Plugin\MediaActionPlugin
{
    /**
     * Load the javascript files of the plugin.
     *
     * @return  void
     *
     * @since   4.0.0
     */
    protected function loadJs()
    {
        parent::loadJs();

        Factory::getApplication()->getDocument()->getWebAssetManager()->useScript('cropperjs');
    }

    /**
     * Load the CSS files of the plugin.
     *
     * @return  void
     *
     * @since   4.0.0
     */
    protected function loadCss()
    {
        parent::loadCss();

        Factory::getApplication()->getDocument()->getWebAssetManager()->useStyle('cropperjs');
    }
}

The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.