vendor/pimcore/advanced-object-search/src/AdvancedObjectSearchBundle.php line 26

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under two different licenses:
  6.  * - GNU General Public License version 3 (GPLv3)
  7.  * - Pimcore Commercial License (PCL)
  8.  * Full copyright and license information is available in
  9.  * LICENSE.md which is distributed with this source code.
  10.  *
  11.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  12.  *  @license    http://www.pimcore.org/license     GPLv3 and PCL
  13.  */
  14. namespace AdvancedObjectSearchBundle;
  15. use Pimcore\Bundle\ElasticsearchClientBundle\PimcoreElasticsearchClientBundle;
  16. use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
  17. use Pimcore\Extension\Bundle\PimcoreBundleAdminClassicInterface;
  18. use Pimcore\Extension\Bundle\Traits\BundleAdminClassicTrait;
  19. use Pimcore\Extension\Bundle\Traits\PackageVersionTrait;
  20. use Pimcore\HttpKernel\Bundle\DependentBundleInterface;
  21. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  22. class AdvancedObjectSearchBundle extends AbstractPimcoreBundle implements DependentBundleInterfacePimcoreBundleAdminClassicInterface
  23. {
  24.     use PackageVersionTrait;
  25.     use BundleAdminClassicTrait;
  26.     /**
  27.      * @inheritDoc
  28.      */
  29.     protected function getComposerPackageName(): string
  30.     {
  31.         return 'pimcore/advanced-object-search';
  32.     }
  33.     /**
  34.      * @inheritDoc
  35.      */
  36.     public function getCssPaths(): array
  37.     {
  38.         return [
  39.             '/bundles/advancedobjectsearch/css/admin.css'
  40.         ];
  41.     }
  42.     /**
  43.      * @inheritDoc
  44.      */
  45.     public function getJsPaths(): array
  46.     {
  47.         return [
  48.             '/bundles/advancedobjectsearch/js/startup.js',
  49.             '/bundles/advancedobjectsearch/js/events.js',
  50.             '/bundles/advancedobjectsearch/js/selector.js',
  51.             '/bundles/advancedobjectsearch/js/helper.js',
  52.             '/bundles/advancedobjectsearch/js/searchConfigPanel.js',
  53.             '/bundles/advancedobjectsearch/js/searchConfig/conditionPanelContainerBuilder.js',
  54.             '/bundles/advancedobjectsearch/js/searchConfig/conditionPanel.js',
  55.             '/bundles/advancedobjectsearch/js/searchConfig/resultAbstractPanel.js',
  56.             '/bundles/advancedobjectsearch/js/searchConfig/resultPanel.js',
  57.             '/bundles/advancedobjectsearch/js/searchConfig/resultExtension.js',
  58.             '/bundles/advancedobjectsearch/js/searchConfig/conditionAbstractPanel.js',
  59.             '/bundles/advancedobjectsearch/js/searchConfig/conditionEntryPanel.js',
  60.             '/bundles/advancedobjectsearch/js/searchConfig/conditionGroupPanel.js',
  61.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/default.js',
  62.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/localizedfields.js',
  63.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/numeric.js',
  64.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/manyToManyOne.js',
  65.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/manyToManyObjectRelation.js',
  66.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/manyToManyRelation.js',
  67.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/fieldcollections.js',
  68.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/objectbricks.js',
  69.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/advancedManyToManyObjectRelation.js',
  70.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/advancedManyToManyRelation.js',
  71.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/checkbox.js',
  72.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/select.js',
  73.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/language.js',
  74.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/country.js',
  75.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/user.js',
  76.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/multiselect.js',
  77.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/countrymultiselect.js',
  78.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/languagemultiselect.js',
  79.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/datetime.js',
  80.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/date.js',
  81.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/time.js',
  82.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/quantityValue.js',
  83.             '/bundles/advancedobjectsearch/js/searchConfig/fieldConditionPanel/table.js',
  84.             '/bundles/advancedobjectsearch/js/portlet/advancedObjectSearch.js'
  85.         ];
  86.     }
  87.     /**
  88.      * @return Installer
  89.      */
  90.     public function getInstaller(): Installer
  91.     {
  92.         return $this->container->get(Installer::class);
  93.     }
  94.     public static function registerDependentBundles(BundleCollection $collection): void
  95.     {
  96.         $collection->addBundle(new PimcoreElasticsearchClientBundle());
  97.         if (\Pimcore\Version::getMajorVersion() >= 11) {
  98.             $collection->addBundle(\Pimcore\Bundle\SimpleBackendSearchBundle\PimcoreSimpleBackendSearchBundle::class);
  99.         }
  100.     }
  101. }