WebAssetManager from DI

This commit is contained in:
Artem Vasilev 2024-03-11 02:07:30 +03:00
parent 0aa1b5a961
commit 4b9ebe81e4

View File

@ -7,6 +7,7 @@
* @license MIT; see LICENSE.txt * @license MIT; see LICENSE.txt
**/ **/
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper; use Joomla\CMS\Layout\LayoutHelper;
@ -18,8 +19,8 @@ defined('_JEXEC') or die;
* @var \Webmasterskaya\Component\OauthServer\Administrator\View\Client\HtmlView $this * @var \Webmasterskaya\Component\OauthServer\Administrator\View\Client\HtmlView $this
*/ */
$wa = $this->document->getWebAssetManager(); Factory::getApplication()->getDocument()->getWebAssetManager()
$wa->useScript('keepalive') ->useScript('keepalive')
->useScript('form.validate'); ->useScript('form.validate');
?> ?>