<?php
/**
* Pimcore
*
* This source file is available under following license:
* - Pimcore Commercial License (PCL)
*
* @copyright Copyright (c) Pimcore GmbH (http://www.pimcore.org)
* @license http://www.pimcore.org/license PCL
*/
namespace Pimcore\Bundle\WorkflowDesignerBundle;
use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle;
use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Bundle\EnterpriseBundleInterface;
use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
use Pimcore\Extension\Bundle\Installer\InstallerInterface;
use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface;
use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait;
use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;
class PimcoreWorkflowDesignerBundle extends AbstractPimcoreBundle implements DependentBundleInterface, EnterpriseBundleInterface, PimcoreBundleAdminClassicInterface
{
const PERMISSION_KEY = 'permission_workflow_designer';
const PERMISSION_KEY_PLACE_PERMISSIONS = 'permission_workflow_designer_place_permissions';
const PERMISSION_KEY_TRANSITION_NOTIFICATIONS = 'permission_workflow_designer_trans_notifications';
const PERMISSIONS = [
self::PERMISSION_KEY,
self::PERMISSION_KEY_PLACE_PERMISSIONS,
self::PERMISSION_KEY_TRANSITION_NOTIFICATIONS
];
use BundleAdminClassicTrait;
use PackageVersionTrait;
protected function getComposerPackageName(): string
{
return 'pimcore/workflow-designer';
}
public function getJsPaths(): array
{
return [
'/bundles/pimcoreworkflowdesigner/js/pimcore/startup.js',
'/bundles/pimcoreworkflowdesigner/js/pimcore/ext_extensions.js',
'/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/configurationTree.js',
'/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/configurationItem.js',
'/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/item/placeSettings.js',
'/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/item/transitionSettings.js',
'/bundles/pimcoreworkflowdesigner/js/pimcore/configuration/item/globalActionSettings.js',
];
}
public function getCssPaths(): array
{
return [
'/bundles/pimcoreworkflowdesigner/css/admin.css',
];
}
public static function registerDependentBundles(BundleCollection $collection): void
{
$collection->addBundle(new WebpackEncoreBundle());
$collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
$collection->addBundle(new PimcoreAdminBundle(), 60);
}
/**
* @return Installer
*/
public function getInstaller(): InstallerInterface
{
return $this->container->get(Installer::class);
}
public function getBundleLicenseId(): string
{
return 'WFD';
}
}