[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/plugins/media-action/crop/ -> crop.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Plugin
   5   * @subpackage  Media-Action.crop
   6   *
   7   * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9  
  10   * @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
  11   */
  12  
  13  use Joomla\CMS\Factory;
  14  
  15  // phpcs:disable PSR1.Files.SideEffects
  16  \defined('_JEXEC') or die;
  17  // phpcs:enable PSR1.Files.SideEffects
  18  
  19  /**
  20   * Media Manager Crop Action
  21   *
  22   * @since  4.0.0
  23   */
  24  class PlgMediaActionCrop extends \Joomla\Component\Media\Administrator\Plugin\MediaActionPlugin
  25  {
  26      /**
  27       * Load the javascript files of the plugin.
  28       *
  29       * @return  void
  30       *
  31       * @since   4.0.0
  32       */
  33      protected function loadJs()
  34      {
  35          parent::loadJs();
  36  
  37          Factory::getApplication()->getDocument()->getWebAssetManager()->useScript('cropperjs');
  38      }
  39  
  40      /**
  41       * Load the CSS files of the plugin.
  42       *
  43       * @return  void
  44       *
  45       * @since   4.0.0
  46       */
  47      protected function loadCss()
  48      {
  49          parent::loadCss();
  50  
  51          Factory::getApplication()->getDocument()->getWebAssetManager()->useStyle('cropperjs');
  52      }
  53  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer