<?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\EnterpriseSubscriptionToolsBundle\Bundle\EnterpriseBundleInterface;
use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\PimcoreEnterpriseSubscriptionToolsBundle;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
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
{
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 PackageVersionTrait;
protected function getComposerPackageName(): string
{
return 'pimcore/workflow-designer';
}
public function getJsPaths()
{
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()
{
return [
'/bundles/pimcoreworkflowdesigner/css/admin.css',
];
}
public static function registerDependentBundles(BundleCollection $collection)
{
$collection->addBundle(new WebpackEncoreBundle());
$collection->addBundle(new PimcoreEnterpriseSubscriptionToolsBundle());
}
/**
* @return Installer
*/
public function getInstaller()
{
return $this->container->get(Installer::class);
}
public function getBundleLicenseId(): string
{
return 'WFD';
}
}