![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/app/bundles/DashboardBundle/Factory/ |
<?php declare(strict_types=1); namespace Mautic\DashboardBundle\Factory; use Mautic\CacheBundle\Cache\CacheProvider; use Mautic\CoreBundle\Helper\CoreParametersHelper; use Mautic\CoreBundle\Helper\PathsHelper; use Mautic\CoreBundle\Helper\UserHelper; use Mautic\CoreBundle\Security\Permissions\CorePermissions; use Mautic\DashboardBundle\Entity\Widget; use Mautic\DashboardBundle\Event\WidgetDetailEvent; use Symfony\Contracts\Translation\TranslatorInterface; class WidgetDetailEventFactory { public function __construct( private TranslatorInterface $translator, private CacheProvider $cacheProvider, private CorePermissions $corePermissions, private UserHelper $userHelper, private CoreParametersHelper $coreParametersHelper, private PathsHelper $pathsHelper, ) { } public function create(Widget $widget): WidgetDetailEvent { $cacheDir = $this->coreParametersHelper->get('cached_data_dir', $this->pathsHelper->getSystemPath('cache', true)); $event = new WidgetDetailEvent($this->translator, $this->corePermissions, $widget, $this->cacheProvider); $event->setCacheDir($cacheDir, $this->userHelper->getUser()->getId()); return $event; } }