CoreFiles by mySites.guru
crop.php48 lines, 946 bytes, from Joomla_4.0.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta2
md5
f4ccdf30a1b8a5bbc402f045219bf5eb
sha1
88c6b2f80ed6fe38bdf3256fb1f67e5f874ded57
sha256
340221fb46f066943b7b15bdf7a8c2571f20ee681675391afd46f85d2eae42ef
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Media-Action.crop
 *
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

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.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.