diff --git a/src/Builder/AbstractConfigBuilder.php b/src/Builder/AbstractConfigBuilder.php index 814e0c20..b537dfd4 100644 --- a/src/Builder/AbstractConfigBuilder.php +++ b/src/Builder/AbstractConfigBuilder.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Builder; use Pimcore\Model\Document\Editable\Area\Info; @@ -38,7 +49,6 @@ protected function parseConfigElements( $acStoreProcessed = false; foreach ($configElements as $configElementName => $elementData) { - // skip inline rendered config elements if ($isInlineContext === true && array_key_exists('inline_rendered', $elementData) && $elementData['inline_rendered'] === true) { continue; @@ -139,5 +149,4 @@ private function checkColumnAdjusterField(string $brickId, ?string $tab, array $ return $editableNodes; } - } diff --git a/src/Builder/BrickConfigBuilder.php b/src/Builder/BrickConfigBuilder.php index 1dcc58bf..4544a408 100644 --- a/src/Builder/BrickConfigBuilder.php +++ b/src/Builder/BrickConfigBuilder.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Builder; use Pimcore\Extension\Document\Areabrick\EditableDialogBoxConfiguration; @@ -35,7 +46,6 @@ public function buildConfigurationData(Info $info, string $brickId, array $areaC $configElements = $areaConfig['config_elements'] ?? []; foreach ($configElements as $itemName => $elementData) { - if ($isInlineContext === true && array_key_exists('inline_rendered', $elementData) && $elementData['inline_rendered'] === true) { continue; } diff --git a/src/Builder/BrickConfigBuilderInterface.php b/src/Builder/BrickConfigBuilderInterface.php index 59aa605a..200b72ad 100644 --- a/src/Builder/BrickConfigBuilderInterface.php +++ b/src/Builder/BrickConfigBuilderInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Builder; use Pimcore\Extension\Document\Areabrick\EditableDialogBoxConfiguration; diff --git a/src/Builder/InlineConfigBuilder.php b/src/Builder/InlineConfigBuilder.php index 0aa996e9..71d57452 100644 --- a/src/Builder/InlineConfigBuilder.php +++ b/src/Builder/InlineConfigBuilder.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Builder; use Pimcore\Model\Document\Editable\Area\Info; @@ -29,7 +40,6 @@ public function buildInlineConfiguration(Info $info, string $brickId, array $are $items = $this->parseConfigElements($info, $brickId, $themeOptions, $inlineConfigElements, [], false); foreach ($items as $item) { - $headlessInfo = $this->editableInfoFactory->createViaBrick($info, $editMode, $item); $renderedEditable = $this->headlessEditableRenderer->buildEditable($headlessInfo); @@ -52,7 +62,6 @@ public function buildInlineConfigurationData(Info $info, string $brickId, array $inlineConfigElements = $areaConfig['inline_config_elements'] ?? []; foreach ($inlineConfigElements as $itemName => $item) { - $item['name'] = $itemName; $headlessInfo = $this->editableInfoFactory->createViaBrick($info, false, $item); diff --git a/src/Builder/InlineConfigBuilderInterface.php b/src/Builder/InlineConfigBuilderInterface.php index 18dc8040..0934c48b 100644 --- a/src/Builder/InlineConfigBuilderInterface.php +++ b/src/Builder/InlineConfigBuilderInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Builder; use Pimcore\Model\Document\Editable\Area\Info; diff --git a/src/Calculator/Bootstrap3/ColumnCalculator.php b/src/Calculator/Bootstrap3/ColumnCalculator.php index 525a10d7..fb011ca6 100644 --- a/src/Calculator/Bootstrap3/ColumnCalculator.php +++ b/src/Calculator/Bootstrap3/ColumnCalculator.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Calculator\Bootstrap3; use ToolboxBundle\Calculator\ColumnCalculatorInterface; diff --git a/src/Calculator/Bootstrap3/SlideColumnCalculator.php b/src/Calculator/Bootstrap3/SlideColumnCalculator.php index 8e80dd7b..c0bb3d32 100644 --- a/src/Calculator/Bootstrap3/SlideColumnCalculator.php +++ b/src/Calculator/Bootstrap3/SlideColumnCalculator.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Calculator\Bootstrap3; use ToolboxBundle\Calculator\SlideColumnCalculatorInterface; diff --git a/src/Calculator/Bootstrap4/ColumnCalculator.php b/src/Calculator/Bootstrap4/ColumnCalculator.php index c7b77803..3dca053b 100644 --- a/src/Calculator/Bootstrap4/ColumnCalculator.php +++ b/src/Calculator/Bootstrap4/ColumnCalculator.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Calculator\Bootstrap4; use ToolboxBundle\Calculator\ColumnCalculatorInterface; @@ -89,7 +100,7 @@ public function calculateColumns(?string $value, ?array $customColumnConfigurati foreach ($customBreakPoints as $customBreakPointName => $customBreakPointData) { $customBreakPointDataColumns = explode('_', $customBreakPointData); $customColAmount = $customBreakPointDataColumns[$i] ?? $gridSize; - if (str_starts_with($customColAmount, 'o')) { + if (str_starts_with($customColAmount, 'o')) { $customOffset = (int) substr($customColAmount, 1); $bpPrefix = $customBreakPointName === 'xs' ? '' : $customBreakPointName . '-'; $bootstrapOffsetConfig[$customBreakPointName] = 'offset-' . $bpPrefix . $customOffset; diff --git a/src/Calculator/Bootstrap4/SlideColumnCalculator.php b/src/Calculator/Bootstrap4/SlideColumnCalculator.php index 18d6b940..36769f40 100644 --- a/src/Calculator/Bootstrap4/SlideColumnCalculator.php +++ b/src/Calculator/Bootstrap4/SlideColumnCalculator.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Calculator\Bootstrap4; use ToolboxBundle\Calculator\SlideColumnCalculatorInterface; diff --git a/src/Calculator/ColumnCalculatorInterface.php b/src/Calculator/ColumnCalculatorInterface.php index 67af684c..387f97e9 100644 --- a/src/Calculator/ColumnCalculatorInterface.php +++ b/src/Calculator/ColumnCalculatorInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Calculator; use ToolboxBundle\Manager\ConfigManagerInterface; diff --git a/src/Calculator/SlideColumnCalculatorInterface.php b/src/Calculator/SlideColumnCalculatorInterface.php index 258f985d..ab791afa 100644 --- a/src/Calculator/SlideColumnCalculatorInterface.php +++ b/src/Calculator/SlideColumnCalculatorInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Calculator; interface SlideColumnCalculatorInterface diff --git a/src/Calculator/UIkit3/ColumnCalculator.php b/src/Calculator/UIkit3/ColumnCalculator.php index 82510b77..e523525d 100644 --- a/src/Calculator/UIkit3/ColumnCalculator.php +++ b/src/Calculator/UIkit3/ColumnCalculator.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Calculator\UIkit3; use ToolboxBundle\Calculator\ColumnCalculatorInterface; diff --git a/src/Calculator/UIkit3/SlideColumnCalculator.php b/src/Calculator/UIkit3/SlideColumnCalculator.php index 6b71714a..7adcc720 100644 --- a/src/Calculator/UIkit3/SlideColumnCalculator.php +++ b/src/Calculator/UIkit3/SlideColumnCalculator.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Calculator\UIkit3; use ToolboxBundle\Calculator\SlideColumnCalculatorInterface; diff --git a/src/Command/AreaConfigurationCommand.php b/src/Command/AreaConfigurationCommand.php index f7f229c8..0a028340 100644 --- a/src/Command/AreaConfigurationCommand.php +++ b/src/Command/AreaConfigurationCommand.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Command; use Symfony\Component\Console\Command\Command; @@ -10,8 +21,6 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use ToolboxBundle\Manager\AdaptiveConfigManagerInterface; -use ToolboxBundle\Manager\ConfigManagerInterface; -use ToolboxBundle\ToolboxConfig; class AreaConfigurationCommand extends Command { diff --git a/src/Connector/BundleConnector.php b/src/Connector/BundleConnector.php index 8a7e29c0..b09877f3 100644 --- a/src/Connector/BundleConnector.php +++ b/src/Connector/BundleConnector.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Connector; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; diff --git a/src/Controller/Admin/ColumnAdjusterController.php b/src/Controller/Admin/ColumnAdjusterController.php index c30d64e2..ac1f3ad7 100644 --- a/src/Controller/Admin/ColumnAdjusterController.php +++ b/src/Controller/Admin/ColumnAdjusterController.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Controller\Admin; use Pimcore\Bundle\AdminBundle\Controller\AdminAbstractController; diff --git a/src/Controller/Admin/SettingsController.php b/src/Controller/Admin/SettingsController.php index a1803a7f..14583d88 100644 --- a/src/Controller/Admin/SettingsController.php +++ b/src/Controller/Admin/SettingsController.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Controller\Admin; use Exception; diff --git a/src/Controller/AjaxController.php b/src/Controller/AjaxController.php index 01023581..9b8491d2 100644 --- a/src/Controller/AjaxController.php +++ b/src/Controller/AjaxController.php @@ -1,10 +1,21 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Controller; +use Pimcore\Controller\FrontendController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; -use Pimcore\Controller\FrontendController; use Symfony\Component\HttpFoundation\Response; use ToolboxBundle\Manager\ConfigManagerInterface; use ToolboxBundle\Manager\LayoutManagerInterface; diff --git a/src/Controller/HeadlessController.php b/src/Controller/HeadlessController.php index 044f3b10..0d4bebb1 100644 --- a/src/Controller/HeadlessController.php +++ b/src/Controller/HeadlessController.php @@ -1,9 +1,20 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Controller; -use Symfony\Component\HttpFoundation\Request; use Pimcore\Controller\FrontendController; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use ToolboxBundle\HeadlessDocument\HeadlessDocumentResolver; diff --git a/src/Controller/SnippetController.php b/src/Controller/SnippetController.php index de2fd08a..19aa474d 100644 --- a/src/Controller/SnippetController.php +++ b/src/Controller/SnippetController.php @@ -1,9 +1,20 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Controller; -use Symfony\Component\HttpFoundation\Request; use Pimcore\Controller\FrontendController; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use ToolboxBundle\Manager\ConfigManagerInterface; diff --git a/src/DependencyInjection/Compiler/AreaBrickAutoloadWatcherPass.php b/src/DependencyInjection/Compiler/AreaBrickAutoloadWatcherPass.php index 00a898a3..d7a4cf3d 100644 --- a/src/DependencyInjection/Compiler/AreaBrickAutoloadWatcherPass.php +++ b/src/DependencyInjection/Compiler/AreaBrickAutoloadWatcherPass.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection\Compiler; use Pimcore\Extension\Document\Areabrick\AreabrickInterface; @@ -22,7 +33,6 @@ public function process(ContainerBuilder $container): void $possibleNoPimcoreAwareBricks = []; foreach ($container->getDefinitions() as $definitionId => $definition) { - if (in_array($definitionId, $disabledAreaBricks, true)) { continue; } diff --git a/src/DependencyInjection/Compiler/AreaBrickRegistryPass.php b/src/DependencyInjection/Compiler/AreaBrickRegistryPass.php index 1f0c3070..a6314879 100644 --- a/src/DependencyInjection/Compiler/AreaBrickRegistryPass.php +++ b/src/DependencyInjection/Compiler/AreaBrickRegistryPass.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection\Compiler; use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException; @@ -62,7 +73,6 @@ public function process(ContainerBuilder $container): void foreach ($legacyTags as $pimcoreAreaBrickAttributes) { $additionalAreaBricksConfig[] = $pimcoreAreaBrickAttributes['id']; } - } // register toolbox bricks @@ -124,7 +134,6 @@ public function process(ContainerBuilder $container): void $simpleBrickDefinition->addMethodCall('setAreaBrickType', [AbstractBaseAreabrick::AREABRICK_TYPE_EXTERNAL]); foreach ($tags as $attributes) { - if (empty($attributes['title'])) { throw new InvalidDefinitionException(sprintf('Simple Areabrick "%s" has an invalid title', $attributes['id'])); } @@ -169,7 +178,7 @@ public function process(ContainerBuilder $container): void } } - if(count($additionalAreaBricksConfig) > 0) { + if (count($additionalAreaBricksConfig) > 0) { $configManagerDefinition = $container->getDefinition(ConfigManager::class); $configManagerDefinition->addMethodCall('addAdditionalAreaConfig', [$additionalAreaBricksConfig]); } diff --git a/src/DependencyInjection/Compiler/CalculatorRegistryPass.php b/src/DependencyInjection/Compiler/CalculatorRegistryPass.php index b3680435..6b1bbf2e 100644 --- a/src/DependencyInjection/Compiler/CalculatorRegistryPass.php +++ b/src/DependencyInjection/Compiler/CalculatorRegistryPass.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/DependencyInjection/Compiler/EditableHandlerPass.php b/src/DependencyInjection/Compiler/EditableHandlerPass.php index 0c0a11cc..ea0d0307 100644 --- a/src/DependencyInjection/Compiler/EditableHandlerPass.php +++ b/src/DependencyInjection/Compiler/EditableHandlerPass.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection\Compiler; use Pimcore\Document\Editable\EditableHandler; diff --git a/src/DependencyInjection/Compiler/MembersBundlePass.php b/src/DependencyInjection/Compiler/MembersBundlePass.php index f70d01f7..48058149 100644 --- a/src/DependencyInjection/Compiler/MembersBundlePass.php +++ b/src/DependencyInjection/Compiler/MembersBundlePass.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/DependencyInjection/Compiler/NormalizerRegistryPass.php b/src/DependencyInjection/Compiler/NormalizerRegistryPass.php index a8b9d845..c4f2874b 100644 --- a/src/DependencyInjection/Compiler/NormalizerRegistryPass.php +++ b/src/DependencyInjection/Compiler/NormalizerRegistryPass.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/DependencyInjection/Compiler/StoreProviderPass.php b/src/DependencyInjection/Compiler/StoreProviderPass.php index 2fbb4e1d..eb47d548 100644 --- a/src/DependencyInjection/Compiler/StoreProviderPass.php +++ b/src/DependencyInjection/Compiler/StoreProviderPass.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 7933c547..12f8a07b 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; @@ -95,8 +106,8 @@ protected function buildCoreAreasConfiguration(): ArrayNodeDefinition ->end(); return $treeBuilder; - } + protected function buildContextSettingsNode(): ArrayNodeDefinition { $treeBuilder = new ArrayNodeDefinition('settings'); @@ -274,7 +285,7 @@ protected function buildThemeConfiguration(): ArrayNodeDefinition return is_array($v) && !isset($v['wrapper_classes']); }) ->then(function ($v) { - return array('wrapper_classes' => $v); + return ['wrapper_classes' => $v]; }) ->end() ->children() @@ -307,7 +318,7 @@ protected function buildDataAttributeConfiguration(): ArrayNodeDefinition return is_array($v) && !isset($v['values']); }) ->then(function ($v) { - return array('values' => $v); + return ['values' => $v]; }) ->end() ->children() @@ -344,10 +355,9 @@ protected function buildAreasSection(): ArrayNodeDefinition ->prototype('array') ->validate() ->ifTrue(function ($v) { - $tabs = $v['tabs']; - return count($tabs) > 0 && count(array_filter($v['config_elements'], static function($configElement) use ($tabs) { + return count($tabs) > 0 && count(array_filter($v['config_elements'], static function ($configElement) use ($tabs) { return !array_key_exists($configElement['tab'], $tabs); })) > 0; }) @@ -360,10 +370,9 @@ protected function buildAreasSection(): ArrayNodeDefinition ->end() ->validate() ->ifTrue(function ($v) { - $tabs = $v['tabs']; - return count($tabs) === 0 && count(array_filter($v['config_elements'], static function($configElement) { + return count($tabs) === 0 && count(array_filter($v['config_elements'], static function ($configElement) { return $configElement['tab'] !== null; })) > 0; }) @@ -378,10 +387,10 @@ protected function buildAreasSection(): ArrayNodeDefinition return true; } } + return false; }) ->then(function ($v) { - foreach ($v['inline_config_elements'] ?? [] as $inlineConfigId => $inlineConfigElement) { if ($inlineConfigElement === '<') { $v['inline_config_elements'][$inlineConfigId] = $v['config_elements'][$inlineConfigId]; @@ -439,7 +448,7 @@ protected function buildConfigElementsSection(string $configType = 'config_eleme ->ifTrue(function ($v) { return $v['type'] !== 'block' && is_array($v['children']) && count($v['children']) > 0; }) - ->then(function($v) { + ->then(function ($v) { @trigger_error(sprintf('Type "%s" cannot have child elements', $v['type']), E_USER_ERROR); }) ->end() @@ -499,7 +508,7 @@ protected function buildHeadlessDocumentsSection(): ArrayNodeDefinition ->ifTrue(function ($v) { return $v['type'] !== 'block' && is_array($v['children']) && count($v['children']) > 0; }) - ->then(function($v) { + ->then(function ($v) { @trigger_error(sprintf('Type "%s" cannot have child elements', $v['type']), E_USER_ERROR); }) ->end() diff --git a/src/DependencyInjection/ToolboxExtension.php b/src/DependencyInjection/ToolboxExtension.php index e3a2641b..6375fc8b 100644 --- a/src/DependencyInjection/ToolboxExtension.php +++ b/src/DependencyInjection/ToolboxExtension.php @@ -1,13 +1,24 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\DependencyInjection; use Pimcore\Bundle\QuillBundle\PimcoreQuillBundle; +use Symfony\Component\Config\FileLocator; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\HttpKernel\DependencyInjection\Extension; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\Config\FileLocator; use Symfony\Component\Yaml\Yaml; use ToolboxBundle\Manager\ConfigManager; use ToolboxBundle\Manager\LayoutManagerInterface; @@ -33,7 +44,6 @@ public function prepend(ContainerBuilder $container): void $loaded = []; foreach ($container->getExtensionConfig($this->getAlias()) as $toolboxConfigNode) { - if (!empty($toolboxConfigNode['theme']['layout'])) { $hasTheme = true; $headlessAware = $toolboxConfigNode['theme']['layout'] === LayoutManagerInterface::TOOLBOX_LAYOUT_HEADLESS; @@ -44,7 +54,6 @@ public function prepend(ContainerBuilder $container): void } foreach ($toolboxConfigNode['enabled_core_areas'] as $areaName) { - if (in_array($areaName, $loaded, true)) { continue; } @@ -125,7 +134,7 @@ private function allocateGoogleMapsApiKey(ContainerBuilder $container): void $pimcoreGoogleBrowserApiKey = null; $pimcoreGoogleSimpleApiKey = null; - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ if ($container->hasParameter('pimcore_google_marketing')) { $pimcoreGoogleMarketingSettings = $container->getParameter('pimcore_google_marketing'); /** @phpstan-ignore-next-line */ @@ -135,22 +144,22 @@ private function allocateGoogleMapsApiKey(ContainerBuilder $container): void } // browser api key - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ if ($container->hasParameter('toolbox_google_service_browser_api_key')) { $googleBrowserApiKey = $container->getParameter('toolbox_google_service_browser_api_key'); - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ } elseif ($pimcoreGoogleBrowserApiKey !== null) { $googleBrowserApiKey = $pimcoreGoogleBrowserApiKey; } //simple api key - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ if ($container->hasParameter('pimcore_system_config.services.google.simpleapikey')) { $googleSimpleApiKey = $container->getParameter('pimcore_system_config.services.google.simpleapikey'); - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ } elseif ($container->hasParameter('toolbox_google_service_simple_api_key')) { $googleSimpleApiKey = $container->getParameter('toolbox_google_service_simple_api_key'); - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ } elseif ($pimcoreGoogleSimpleApiKey !== null) { $googleSimpleApiKey = $pimcoreGoogleSimpleApiKey; } @@ -187,7 +196,6 @@ private function parseContextConfigs(array $configs): array } foreach ($configs as $config) { - if (!isset($config['context'])) { continue; } @@ -199,13 +207,11 @@ private function parseContextConfigs(array $configs): array // get context data foreach ($configs as $config) { - if (!isset($config['context'])) { continue; } foreach ($config['context'] as $contextName => $contextConfig) { - if ($contextMergeCandidates[$contextName] === false) { continue; } @@ -220,7 +226,6 @@ private function parseContextConfigs(array $configs): array // get context merge data foreach ($contextMergeCandidates as $contextName => $merge) { - if ($merge === false) { continue; } diff --git a/src/Document/Areabrick/AbstractAreabrick.php b/src/Document/Areabrick/AbstractAreabrick.php index 273c01c6..db8363eb 100644 --- a/src/Document/Areabrick/AbstractAreabrick.php +++ b/src/Document/Areabrick/AbstractAreabrick.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Areabrick; use Pimcore\Extension\Document\Areabrick\EditableDialogBoxConfiguration; diff --git a/src/Document/Areabrick/AbstractBaseAreabrick.php b/src/Document/Areabrick/AbstractBaseAreabrick.php index 58970214..bdf7aafb 100644 --- a/src/Document/Areabrick/AbstractBaseAreabrick.php +++ b/src/Document/Areabrick/AbstractBaseAreabrick.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Areabrick; use Pimcore\Extension\Document\Areabrick\AbstractAreabrick as PimcoreAbstractAreabrick; @@ -23,7 +34,6 @@ abstract class AbstractBaseAreabrick extends PimcoreAbstractAreabrick protected LayoutManagerInterface $layoutManager; protected InlineConfigBuilderInterface $inlineConfigBuilder; protected EventDispatcherInterface $eventDispatcher; - protected string $areaBrickType = 'internal'; protected ?array $areaConfig = null; protected ?array $areaThemeConfig = null; @@ -70,7 +80,6 @@ public function headlessAction(Document\Editable\Area\Info $info, HeadlessRespon if (!$this instanceof AbstractAreabrick) { $this->triggerHeadlessEditableActionEvent($info, $headlessResponse); } - } public function getTemplateDirectoryName(): string @@ -128,7 +137,6 @@ public function isHeadlessLayoutAware(): bool return $themeConfig['layout'] === LayoutManagerInterface::TOOLBOX_LAYOUT_HEADLESS; } - private function checkInlineConfigElements(Document\Editable\Area\Info $info): void { $areaConfig = $this->getAreaConfig(); diff --git a/src/Document/Areabrick/ToolboxHeadlessAwareBrickInterface.php b/src/Document/Areabrick/ToolboxHeadlessAwareBrickInterface.php index 7a7e860d..2f06927b 100644 --- a/src/Document/Areabrick/ToolboxHeadlessAwareBrickInterface.php +++ b/src/Document/Areabrick/ToolboxHeadlessAwareBrickInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Areabrick; use Pimcore\Model\Document\Editable\Area\Info; diff --git a/src/Document/Editable/ConfigParser.php b/src/Document/Editable/ConfigParser.php index 45e39a6c..055ebc3e 100644 --- a/src/Document/Editable/ConfigParser.php +++ b/src/Document/Editable/ConfigParser.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Editable; use Pimcore\Model\Document\Editable\Area\Info; @@ -168,7 +179,6 @@ private function castPimcoreEditableValue(string $type, mixed $value): mixed return $value; } - private function buildStore($type, $config): array { $storeValues = []; diff --git a/src/Document/Editable/DTO/HeadlessEditableInfo.php b/src/Document/Editable/DTO/HeadlessEditableInfo.php index a308da9b..2a741fe7 100644 --- a/src/Document/Editable/DTO/HeadlessEditableInfo.php +++ b/src/Document/Editable/DTO/HeadlessEditableInfo.php @@ -2,6 +2,17 @@ declare(strict_types=1); +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Editable\DTO; use Pimcore\Model\Document; diff --git a/src/Document/Editable/EditableHandler.php b/src/Document/Editable/EditableHandler.php index 01a4a314..eb4b0068 100644 --- a/src/Document/Editable/EditableHandler.php +++ b/src/Document/Editable/EditableHandler.php @@ -2,6 +2,17 @@ declare(strict_types=1); +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Editable; use Pimcore\Document\Editable\Block\BlockState; diff --git a/src/Document/Editable/EditableJsonSubscriber.php b/src/Document/Editable/EditableJsonSubscriber.php index 40c6ec85..2d8c215b 100644 --- a/src/Document/Editable/EditableJsonSubscriber.php +++ b/src/Document/Editable/EditableJsonSubscriber.php @@ -2,6 +2,17 @@ declare(strict_types=1); +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Editable; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -10,13 +21,13 @@ final class EditableJsonSubscriber implements EventSubscriberInterface { - protected const ELEMENTS_IDENTIFIER = 'elements'; - protected const ELEMENT_TYPE_IDENTIFIER = 'elementType'; - protected const ELEMENT_SUB_TYPE_IDENTIFIER = 'elementSubType'; - protected const ELEMENT_HASH = 'elementHash'; - protected const ELEMENT_DATA_IDENTIFIER = 'elementContext'; + private const ELEMENTS_IDENTIFIER = 'elements'; + private const ELEMENT_TYPE_IDENTIFIER = 'elementType'; + private const ELEMENT_SUB_TYPE_IDENTIFIER = 'elementSubType'; + private const ELEMENT_HASH = 'elementHash'; + private const ELEMENT_DATA_IDENTIFIER = 'elementContext'; - protected array $jsonEditables = []; + private array $jsonEditables = []; public static function getSubscribedEvents(): array { @@ -45,12 +56,11 @@ private function convertNestedArray($flatArray): array $nestedArray = []; foreach ($flatArray as $key => $value) { - $keys = explode(':', $key); $currentArray = &$nestedArray; foreach ($keys as $nestedKey) { - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ if (!isset($currentArray[self::ELEMENTS_IDENTIFIER][$nestedKey])) { $currentArray[self::ELEMENTS_IDENTIFIER][$nestedKey] = []; } @@ -64,7 +74,7 @@ private function convertNestedArray($flatArray): array $currentArray[self::ELEMENT_DATA_IDENTIFIER] = $value[3]; } - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ return $nestedArray[self::ELEMENTS_IDENTIFIER] ?? []; } @@ -75,7 +85,6 @@ private function simplifyNestedArray(&$array): void } foreach ($array as &$value) { - if ( is_array($value) && count($value) === 1 && @@ -96,7 +105,6 @@ private function sortNestedArray(&$array): void } foreach ($array as &$item) { - if (!is_array($item)) { continue; } diff --git a/src/Document/Editable/EditableWorker.php b/src/Document/Editable/EditableWorker.php index 32c0ec51..3a73f7f4 100644 --- a/src/Document/Editable/EditableWorker.php +++ b/src/Document/Editable/EditableWorker.php @@ -2,6 +2,17 @@ declare(strict_types=1); +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Editable; use Pimcore\Document\Editable\Block\BlockState; @@ -138,7 +149,6 @@ private function processSimpleEditableData(HeadlessResponse $data): array $elementData = $data->getInlineConfigElementData(); foreach ($elementData as $configName => $configData) { - if (array_key_exists('property_normalizer', $config) && $config['property_normalizer'] !== null) { $configData = $this->applyNormalizer($config['property_normalizer'], $configData); } elseif (null !== $defaultNormalizer = $this->getDefaultNormalizer($editableType)) { @@ -167,10 +177,8 @@ private function processElementData(HeadlessResponse $data, string $areaName): a ]; foreach ($configBlocks as $configBlockName => $configBlockData) { - $configElements = $brickConfig[$configBlockName] ?? []; foreach ($configBlockData as $configName => $configData) { - if ($configBlockName === 'additional_property_normalizer' && array_key_exists($configName, $configElements)) { $configData = $this->applyNormalizer($configElements[$configName], $configData); } elseif ($configBlockName !== 'additional_property_normalizer') { diff --git a/src/Document/Editable/HeadlessEditableRenderer.php b/src/Document/Editable/HeadlessEditableRenderer.php index 43689106..4ad9a548 100644 --- a/src/Document/Editable/HeadlessEditableRenderer.php +++ b/src/Document/Editable/HeadlessEditableRenderer.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Editable; use Pimcore\Extension\Document\Areabrick\Exception\ConfigurationException; @@ -54,11 +65,11 @@ public function renderEditableWithWrapper(string $type, array $viewParameters): public function buildEditable(HeadlessEditableInfo $headlessEditableInfo): Editable|string|array { return match ($headlessEditableInfo->getType()) { - 'block' => $this->buildBlockEditable($headlessEditableInfo), - 'area' => $this->buildAreaEditable($headlessEditableInfo), + 'block' => $this->buildBlockEditable($headlessEditableInfo), + 'area' => $this->buildAreaEditable($headlessEditableInfo), 'areablock' => $this->buildAreaBlockEditable($headlessEditableInfo), - 'column' => $this->buildColumnEditable($headlessEditableInfo), - default => $this->buildStandardEditable($headlessEditableInfo), + 'column' => $this->buildColumnEditable($headlessEditableInfo), + default => $this->buildStandardEditable($headlessEditableInfo), }; } @@ -82,7 +93,6 @@ private function buildColumnEditable(HeadlessEditableInfo $headlessEditableInfo) } foreach ($headlessEditableInfo->getChildren() as $headlessColumnEditableInfo) { - $areaBlockDataResponse = null; $editable = $this->getEditable($headlessColumnEditableInfo); @@ -160,7 +170,6 @@ private function buildBlockEditable(HeadlessEditableInfo $headlessEditableInfo): $blockEditable = $this->editableRenderer->getEditable($document, 'block', $headlessEditableInfo->getName(), $config, $headlessEditableInfo->isEditMode()); foreach ($blockEditable->getIterator() as $blockIndex) { - $blockHash = $this->editableWorker->buildBlockHash($headlessEditableInfo->getName(), $blockIndex); $blockNamespace = sprintf('%s:%s', $headlessEditableInfo->getName(), $blockIndex); @@ -171,7 +180,6 @@ private function buildBlockEditable(HeadlessEditableInfo $headlessEditableInfo): $this->editableWorker->processVirtualElement(HeadlessResponse::TYPE_EDITABLE, 'block', $blockHash, $blockNamespace); foreach ($headlessEditableInfo->getChildren() as $childHeadlessEditableInfo) { - $editable = $this->getEditable($childHeadlessEditableInfo); ob_start(); @@ -206,9 +214,7 @@ private function processEditable(HeadlessEditableInfo $headlessEditableInfo, Edi $isSimple = !$headlessEditableInfo->isBlockEditable(); if ($headlessEditableInfo->isStandAlone() === true) { - if ($editMode === false) { - $simpleHeadlessResponse = new HeadlessResponse( HeadlessResponse::TYPE_EDITABLE, $type, diff --git a/src/Document/Response/HeadlessResponse.php b/src/Document/Response/HeadlessResponse.php index d88c5ce8..e2e80875 100644 --- a/src/Document/Response/HeadlessResponse.php +++ b/src/Document/Response/HeadlessResponse.php @@ -2,6 +2,17 @@ declare(strict_types=1); +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\Response; class HeadlessResponse @@ -37,7 +48,6 @@ public function hasBrickParent(): bool return $this->brickParent !== null; } - public function getBrickParent(): ?string { return $this->brickParent; diff --git a/src/Document/SimpleAreabrick/SimpleAreaBrick.php b/src/Document/SimpleAreabrick/SimpleAreaBrick.php index 424995a3..dc2411f9 100644 --- a/src/Document/SimpleAreabrick/SimpleAreaBrick.php +++ b/src/Document/SimpleAreabrick/SimpleAreaBrick.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\SimpleAreabrick; use ToolboxBundle\Document\Areabrick\AbstractBaseAreabrick; diff --git a/src/Document/SimpleAreabrick/SimpleAreaBrickConfigurable.php b/src/Document/SimpleAreabrick/SimpleAreaBrickConfigurable.php index ac03ed93..5fafeff5 100644 --- a/src/Document/SimpleAreabrick/SimpleAreaBrickConfigurable.php +++ b/src/Document/SimpleAreabrick/SimpleAreaBrickConfigurable.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\SimpleAreabrick; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; diff --git a/src/Document/SimpleAreabrick/SimpleAreaBrickTrait.php b/src/Document/SimpleAreabrick/SimpleAreaBrickTrait.php index a981ff19..fd818a65 100644 --- a/src/Document/SimpleAreabrick/SimpleAreaBrickTrait.php +++ b/src/Document/SimpleAreabrick/SimpleAreaBrickTrait.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\SimpleAreabrick; trait SimpleAreaBrickTrait diff --git a/src/Document/ToolboxAreabrick/Accordion/Accordion.php b/src/Document/ToolboxAreabrick/Accordion/Accordion.php index 6189a087..149ff8f4 100644 --- a/src/Document/ToolboxAreabrick/Accordion/Accordion.php +++ b/src/Document/ToolboxAreabrick/Accordion/Accordion.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Accordion; use Pimcore\Model\Document\Editable\Area\Info; diff --git a/src/Document/ToolboxAreabrick/Anchor/Anchor.php b/src/Document/ToolboxAreabrick/Anchor/Anchor.php index e8480f56..ca172d61 100644 --- a/src/Document/ToolboxAreabrick/Anchor/Anchor.php +++ b/src/Document/ToolboxAreabrick/Anchor/Anchor.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Anchor; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; diff --git a/src/Document/ToolboxAreabrick/Columns/Columns.php b/src/Document/ToolboxAreabrick/Columns/Columns.php index e055600d..7f2df1f8 100644 --- a/src/Document/ToolboxAreabrick/Columns/Columns.php +++ b/src/Document/ToolboxAreabrick/Columns/Columns.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Columns; use Pimcore\Model\Document\Editable\Area\Info; diff --git a/src/Document/ToolboxAreabrick/Container/Container.php b/src/Document/ToolboxAreabrick/Container/Container.php index 8b1f1b71..9eed9d35 100644 --- a/src/Document/ToolboxAreabrick/Container/Container.php +++ b/src/Document/ToolboxAreabrick/Container/Container.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Container; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; diff --git a/src/Document/ToolboxAreabrick/Content/Content.php b/src/Document/ToolboxAreabrick/Content/Content.php index b20d131c..48503163 100644 --- a/src/Document/ToolboxAreabrick/Content/Content.php +++ b/src/Document/ToolboxAreabrick/Content/Content.php @@ -1,9 +1,18 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Content; -use Pimcore\Model\Document\Editable\Area\Info; -use Symfony\Component\HttpFoundation\Response; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; use ToolboxBundle\Document\Areabrick\ToolboxHeadlessAwareBrickInterface; diff --git a/src/Document/ToolboxAreabrick/Download/Download.php b/src/Document/ToolboxAreabrick/Download/Download.php index ae5e7d91..5f6b5d37 100644 --- a/src/Document/ToolboxAreabrick/Download/Download.php +++ b/src/Document/ToolboxAreabrick/Download/Download.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Download; use Doctrine\DBAL\Query\QueryBuilder; diff --git a/src/Document/ToolboxAreabrick/Gallery/Gallery.php b/src/Document/ToolboxAreabrick/Gallery/Gallery.php index 78a602a8..b24d89d6 100644 --- a/src/Document/ToolboxAreabrick/Gallery/Gallery.php +++ b/src/Document/ToolboxAreabrick/Gallery/Gallery.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Gallery; use Pimcore\Model\Asset; @@ -15,7 +26,6 @@ class Gallery extends AbstractAreabrick implements ToolboxHeadlessAwareBrickInte { public function __construct(protected DataAttributeService $dataAttributeService) { - } public function action(Info $info): ?Response @@ -46,7 +56,6 @@ protected function buildInfoParameters(Info $info, ?HeadlessResponse $headlessRe ]; if ($headlessResponse instanceof HeadlessResponse) { - $brickParams = array_merge($brickParams, [ 'galleryDataAttributes' => $this->dataAttributeService->generateDataAttributesAsArray('gallery'), 'thumbsDataAttributes' => $this->dataAttributeService->generateDataAttributesAsArray('gallery_thumbs'), diff --git a/src/Document/ToolboxAreabrick/GoogleMap/GoogleMap.php b/src/Document/ToolboxAreabrick/GoogleMap/GoogleMap.php index b9c0deff..1695d584 100644 --- a/src/Document/ToolboxAreabrick/GoogleMap/GoogleMap.php +++ b/src/Document/ToolboxAreabrick/GoogleMap/GoogleMap.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\GoogleMap; use Pimcore\Model\Document\Editable\Area\Info; diff --git a/src/Document/ToolboxAreabrick/Headline/Headline.php b/src/Document/ToolboxAreabrick/Headline/Headline.php index edcc2064..d3e8888c 100644 --- a/src/Document/ToolboxAreabrick/Headline/Headline.php +++ b/src/Document/ToolboxAreabrick/Headline/Headline.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Headline; use Pimcore\File; diff --git a/src/Document/ToolboxAreabrick/IFrame/IFrame.php b/src/Document/ToolboxAreabrick/IFrame/IFrame.php index 1867bd79..32b50ad5 100644 --- a/src/Document/ToolboxAreabrick/IFrame/IFrame.php +++ b/src/Document/ToolboxAreabrick/IFrame/IFrame.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\IFrame; use GuzzleHttp\Client; diff --git a/src/Document/ToolboxAreabrick/Image/Image.php b/src/Document/ToolboxAreabrick/Image/Image.php index 0a57502c..6d16b5f4 100644 --- a/src/Document/ToolboxAreabrick/Image/Image.php +++ b/src/Document/ToolboxAreabrick/Image/Image.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Image; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; diff --git a/src/Document/ToolboxAreabrick/LinkList/LinkList.php b/src/Document/ToolboxAreabrick/LinkList/LinkList.php index 614da550..557e8828 100644 --- a/src/Document/ToolboxAreabrick/LinkList/LinkList.php +++ b/src/Document/ToolboxAreabrick/LinkList/LinkList.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\LinkList; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; diff --git a/src/Document/ToolboxAreabrick/ParallaxContainer/ParallaxContainer.php b/src/Document/ToolboxAreabrick/ParallaxContainer/ParallaxContainer.php index 4bb137ce..6ec80ca1 100644 --- a/src/Document/ToolboxAreabrick/ParallaxContainer/ParallaxContainer.php +++ b/src/Document/ToolboxAreabrick/ParallaxContainer/ParallaxContainer.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\ParallaxContainer; use Pimcore\Model\Asset; @@ -77,7 +88,6 @@ private function buildSectionContent(Editable\Area\Info $info): string $loopIndex = 1; while ($sectionBlock->loop()) { - /** @var Editable\Relation $parallaxBackgroundElement */ $parallaxBackgroundElement = $this->getDocumentEditable($info->getDocument(), 'relation', 'background_image'); $parallaxBackgroundColor = $this->getDocumentEditable($info->getDocument(), 'select', 'background_color')->getData(); diff --git a/src/Document/ToolboxAreabrick/Separator/Separator.php b/src/Document/ToolboxAreabrick/Separator/Separator.php index 63c2b9fc..4e558b1f 100644 --- a/src/Document/ToolboxAreabrick/Separator/Separator.php +++ b/src/Document/ToolboxAreabrick/Separator/Separator.php @@ -1,9 +1,18 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Separator; -use Pimcore\Model\Document\Editable\Area\Info; -use Symfony\Component\HttpFoundation\Response; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; use ToolboxBundle\Document\Areabrick\ToolboxHeadlessAwareBrickInterface; diff --git a/src/Document/ToolboxAreabrick/SlideColumns/SlideColumns.php b/src/Document/ToolboxAreabrick/SlideColumns/SlideColumns.php index eedacc8c..5b3d4a22 100644 --- a/src/Document/ToolboxAreabrick/SlideColumns/SlideColumns.php +++ b/src/Document/ToolboxAreabrick/SlideColumns/SlideColumns.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\SlideColumns; use Pimcore\Model\Document\Editable\Area\Info; diff --git a/src/Document/ToolboxAreabrick/Snippet/Snippet.php b/src/Document/ToolboxAreabrick/Snippet/Snippet.php index 40408471..ff030594 100644 --- a/src/Document/ToolboxAreabrick/Snippet/Snippet.php +++ b/src/Document/ToolboxAreabrick/Snippet/Snippet.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Snippet; use Pimcore\Model\Document\Editable\Area\Info; diff --git a/src/Document/ToolboxAreabrick/Spacer/Spacer.php b/src/Document/ToolboxAreabrick/Spacer/Spacer.php index 977b5746..ec31d0fc 100644 --- a/src/Document/ToolboxAreabrick/Spacer/Spacer.php +++ b/src/Document/ToolboxAreabrick/Spacer/Spacer.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Spacer; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; diff --git a/src/Document/ToolboxAreabrick/Teaser/Teaser.php b/src/Document/ToolboxAreabrick/Teaser/Teaser.php index 4d98a21a..2ecfce75 100644 --- a/src/Document/ToolboxAreabrick/Teaser/Teaser.php +++ b/src/Document/ToolboxAreabrick/Teaser/Teaser.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Teaser; use ToolboxBundle\Document\Areabrick\AbstractAreabrick; diff --git a/src/Document/ToolboxAreabrick/Video/Video.php b/src/Document/ToolboxAreabrick/Video/Video.php index fac172f3..4907e9d2 100644 --- a/src/Document/ToolboxAreabrick/Video/Video.php +++ b/src/Document/ToolboxAreabrick/Video/Video.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Document\ToolboxAreabrick\Video; use Pimcore\Model\Asset; diff --git a/src/Event/HeadlessEditableActionEvent.php b/src/Event/HeadlessEditableActionEvent.php index 1e03d799..090a37b9 100644 --- a/src/Event/HeadlessEditableActionEvent.php +++ b/src/Event/HeadlessEditableActionEvent.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Event; use Pimcore\Model\Document\Editable\Area\Info; diff --git a/src/Event/HeadlessElementEvent.php b/src/Event/HeadlessElementEvent.php index 7b4b4297..49105ec4 100644 --- a/src/Event/HeadlessElementEvent.php +++ b/src/Event/HeadlessElementEvent.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Event; use Symfony\Contracts\EventDispatcher\Event; diff --git a/src/EventListener/Admin/AssetListener.php b/src/EventListener/Admin/AssetListener.php index cf1e6b2f..a357dd41 100644 --- a/src/EventListener/Admin/AssetListener.php +++ b/src/EventListener/Admin/AssetListener.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\EventListener\Admin; use Pimcore\Event\BundleManager\PathsEvent; diff --git a/src/EventListener/Admin/EditmodeListener.php b/src/EventListener/Admin/EditmodeListener.php index 389b9236..3c81bcca 100644 --- a/src/EventListener/Admin/EditmodeListener.php +++ b/src/EventListener/Admin/EditmodeListener.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\EventListener\Admin; use Pimcore\Http\Request\Resolver\EditmodeResolver; @@ -58,7 +69,7 @@ public function onKernelResponse(ResponseEvent $event): void $html = str_replace( '<!-- /pimcore editmode -->', - sprintf("%s%s<!-- /pimcore editmode -->", implode(PHP_EOL, $scripts['head']), PHP_EOL), + sprintf('%s%s<!-- /pimcore editmode -->', implode(PHP_EOL, $scripts['head']), PHP_EOL), $html ); diff --git a/src/EventListener/Frontend/FrontendJsListener.php b/src/EventListener/Frontend/FrontendJsListener.php index bc1cd309..72acdc49 100644 --- a/src/EventListener/Frontend/FrontendJsListener.php +++ b/src/EventListener/Frontend/FrontendJsListener.php @@ -1,11 +1,22 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\EventListener\Frontend; -use Pimcore\Tool; use Pimcore\Bundle\CoreBundle\EventListener\Traits\PimcoreContextAwareTrait; use Pimcore\Bundle\CoreBundle\EventListener\Traits\ResponseInjectionTrait; use Pimcore\Http\Request\Resolver\PimcoreContextResolver; +use Pimcore\Tool; use Symfony\Component\HttpKernel\Event\ResponseEvent; use Symfony\Component\Templating\EngineInterface; @@ -13,6 +24,7 @@ class FrontendJsListener { use ResponseInjectionTrait; use PimcoreContextAwareTrait; + private EngineInterface $templatingEngine; public function __construct(EngineInterface $templatingEngine) diff --git a/src/Factory/HeadlessEditableInfoFactory.php b/src/Factory/HeadlessEditableInfoFactory.php index 4edd0344..08c56100 100644 --- a/src/Factory/HeadlessEditableInfoFactory.php +++ b/src/Factory/HeadlessEditableInfoFactory.php @@ -2,6 +2,17 @@ declare(strict_types=1); +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Factory; use Pimcore\Model\Document; @@ -58,7 +69,6 @@ protected function createChildren( array $parameters = [], bool $hasBrickParent = false ): array { - if ($item['type'] === 'column') { return $this->createColumnChildren($item, $document, $editableId, $editMode, $parameters); } @@ -77,7 +87,6 @@ protected function createColumnChildren( bool $editMode, array $parameters = [] ): array { - $resolvedChildren = []; $columns = $parameters['columns'] ?? []; @@ -109,12 +118,10 @@ protected function createBlockChildren( array $parameters = [], bool $hasBrickParent = false ): array { - $resolvedChildren = []; $children = $item['children'] ?? []; foreach ($children as $childName => $childData) { - $brickParent = null; $editableConfiguration = null; diff --git a/src/HeadlessDocument/HeadlessDocumentResolver.php b/src/HeadlessDocument/HeadlessDocumentResolver.php index 14f3f4ed..3439a50e 100644 --- a/src/HeadlessDocument/HeadlessDocumentResolver.php +++ b/src/HeadlessDocument/HeadlessDocumentResolver.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\HeadlessDocument; use Pimcore\Http\Request\Resolver\EditmodeResolver; @@ -36,7 +47,6 @@ public function resolveDocument(Request $request, Document $document, string $he $headlessDocumentConfig = $this->configManager->getHeadlessDocumentConfig($headlessDocumentName); if (empty($headlessDocumentConfig)) { - $message = sprintf('Headless document definition "%s" not found', $headlessDocumentName); return $editMode @@ -56,7 +66,6 @@ private function buildEditModeOutput(Document $document, string $headlessDocumen $editModeEditables = []; foreach ($areas as $itemName => $item) { - $item['name'] = $itemName; if (!in_array($item['type'], ['areablock', 'area'])) { @@ -105,7 +114,6 @@ private function buildJsonOutput(Document $document, array $areas): JsonResponse $this->registerEventSubscriber(); foreach ($areas as $itemName => $item) { - $item['name'] = $itemName; $headlessInfo = $this->editableInfoFactory->createViaEditable($document, $itemName, false, $item); $this->headlessEditableRenderer->buildEditable($headlessInfo); diff --git a/src/Maintenance/AreaPermissionTask.php b/src/Maintenance/AreaPermissionTask.php index 78e3fc1e..7c8d7bcb 100644 --- a/src/Maintenance/AreaPermissionTask.php +++ b/src/Maintenance/AreaPermissionTask.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Maintenance; use Pimcore\Maintenance\TaskInterface; diff --git a/src/Manager/AdaptiveConfigManager.php b/src/Manager/AdaptiveConfigManager.php index 13acec54..e39d8ff2 100644 --- a/src/Manager/AdaptiveConfigManager.php +++ b/src/Manager/AdaptiveConfigManager.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; class AdaptiveConfigManager extends ConfigManager implements AdaptiveConfigManagerInterface diff --git a/src/Manager/AdaptiveConfigManagerInterface.php b/src/Manager/AdaptiveConfigManagerInterface.php index 9be92d98..18fd1467 100644 --- a/src/Manager/AdaptiveConfigManagerInterface.php +++ b/src/Manager/AdaptiveConfigManagerInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; interface AdaptiveConfigManagerInterface extends ConfigManagerInterface diff --git a/src/Manager/AreaManager.php b/src/Manager/AreaManager.php index 55b9edcf..f2e9c889 100644 --- a/src/Manager/AreaManager.php +++ b/src/Manager/AreaManager.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; use Pimcore\Extension\Document\Areabrick\AbstractTemplateAreabrick; diff --git a/src/Manager/AreaManagerInterface.php b/src/Manager/AreaManagerInterface.php index e3180cde..58ea7d52 100644 --- a/src/Manager/AreaManagerInterface.php +++ b/src/Manager/AreaManagerInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; interface AreaManagerInterface diff --git a/src/Manager/ConfigManager.php b/src/Manager/ConfigManager.php index 36c01a1f..d1972b90 100644 --- a/src/Manager/ConfigManager.php +++ b/src/Manager/ConfigManager.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; use ToolboxBundle\Resolver\ContextResolverInterface; @@ -26,7 +37,6 @@ public function setConfig(array $config = []): void public function addAdditionalAreaConfig(array $additionalAreaConfig = []): void { foreach ($additionalAreaConfig as $additionalAreaId) { - if (array_key_exists($additionalAreaId, $this->config['areas'])) { continue; } @@ -34,7 +44,6 @@ public function addAdditionalAreaConfig(array $additionalAreaConfig = []): void $this->config['areas'][$additionalAreaId] = [ 'enabled' => true ]; - } } @@ -186,7 +195,7 @@ private function parseContextConfig(string $currentContextId): array } return [ - 'config' => $parsedData, + 'config' => $parsedData, 'settings' => $contextSettings ]; } diff --git a/src/Manager/ConfigManagerInterface.php b/src/Manager/ConfigManagerInterface.php index ffac1296..d57fd0d0 100644 --- a/src/Manager/ConfigManagerInterface.php +++ b/src/Manager/ConfigManagerInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; interface ConfigManagerInterface @@ -29,7 +40,7 @@ public function getHeadlessDocumentConfig(string $headlessDocumentName): array; /** * @throws \Exception */ - public function areaIsEnabled(string $areaName,): bool; + public function areaIsEnabled(string $areaName): bool; /** * @throws \Exception diff --git a/src/Manager/LayoutManager.php b/src/Manager/LayoutManager.php index 5cc2b718..beeaa367 100644 --- a/src/Manager/LayoutManager.php +++ b/src/Manager/LayoutManager.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; use Symfony\Component\Templating\EngineInterface; diff --git a/src/Manager/LayoutManagerInterface.php b/src/Manager/LayoutManagerInterface.php index 8883067d..cc3e0b9e 100644 --- a/src/Manager/LayoutManagerInterface.php +++ b/src/Manager/LayoutManagerInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; interface LayoutManagerInterface diff --git a/src/Manager/PermissionManager.php b/src/Manager/PermissionManager.php index 6f3137af..2f1ff69f 100644 --- a/src/Manager/PermissionManager.php +++ b/src/Manager/PermissionManager.php @@ -1,11 +1,22 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; use Pimcore\Extension\Document\Areabrick\AreabrickInterface; use Pimcore\Extension\Document\Areabrick\AreabrickManager; -use Pimcore\Model\User; use Pimcore\Model\Translation; +use Pimcore\Model\User; use Pimcore\Security\User\UserLoader; class PermissionManager implements PermissionManagerInterface diff --git a/src/Manager/PermissionManagerInterface.php b/src/Manager/PermissionManagerInterface.php index 99ec05a8..e9fcf649 100644 --- a/src/Manager/PermissionManagerInterface.php +++ b/src/Manager/PermissionManagerInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Manager; interface PermissionManagerInterface diff --git a/src/Model/Document/Editable/ColumnAdjuster.php b/src/Model/Document/Editable/ColumnAdjuster.php index 5fcfb9ff..e68a24d0 100644 --- a/src/Model/Document/Editable/ColumnAdjuster.php +++ b/src/Model/Document/Editable/ColumnAdjuster.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Model\Document\Editable; use Pimcore\Model\Document; diff --git a/src/Model/Document/Editable/GoogleMap.php b/src/Model/Document/Editable/GoogleMap.php index ae6d957f..720e12f7 100644 --- a/src/Model/Document/Editable/GoogleMap.php +++ b/src/Model/Document/Editable/GoogleMap.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Model\Document\Editable; use Pimcore\Model\Document; diff --git a/src/Model/Document/Editable/ParallaxImage.php b/src/Model/Document/Editable/ParallaxImage.php index 3896374c..cd38a789 100644 --- a/src/Model/Document/Editable/ParallaxImage.php +++ b/src/Model/Document/Editable/ParallaxImage.php @@ -1,12 +1,23 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Model\Document\Editable; use Pimcore\Model; -use Pimcore\Model\Element; -use Pimcore\Model\Document; use Pimcore\Model\Asset; use Pimcore\Model\DataObject; +use Pimcore\Model\Document; +use Pimcore\Model\Element; class ParallaxImage extends Model\Document\Editable\Relations { diff --git a/src/Model/Document/Editable/Vhs.php b/src/Model/Document/Editable/Vhs.php index bedebe09..41e5f2e2 100644 --- a/src/Model/Document/Editable/Vhs.php +++ b/src/Model/Document/Editable/Vhs.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Model\Document\Editable; use Pimcore\Model; diff --git a/src/Normalizer/DownloadRelationsNormalizer.php b/src/Normalizer/DownloadRelationsNormalizer.php index 983abac3..f6c9df82 100644 --- a/src/Normalizer/DownloadRelationsNormalizer.php +++ b/src/Normalizer/DownloadRelationsNormalizer.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Normalizer; use ToolboxBundle\Service\DownloadInfoService; @@ -19,7 +30,6 @@ public function normalize(mixed $value, ?string $toolboxContextId = null): mixed $normalizedData = []; foreach ($value as $asset) { - $normalizedDownloadInfo = $this->downloadInfoService->getDownloadInfo($asset, true, 'optimized'); if (array_key_exists('previewImage', $normalizedDownloadInfo)) { diff --git a/src/Normalizer/GalleryRelationsNormalizer.php b/src/Normalizer/GalleryRelationsNormalizer.php index 12f4afd0..56daf55b 100644 --- a/src/Normalizer/GalleryRelationsNormalizer.php +++ b/src/Normalizer/GalleryRelationsNormalizer.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Normalizer; use Pimcore\Model\Asset; @@ -23,7 +34,6 @@ public function normalize(mixed $value, ?string $toolboxContextId = null): mixed $normalizedData = []; foreach ($value as $asset) { - if (!$asset instanceof Asset\Image) { continue; } diff --git a/src/Normalizer/ImageEditableNormalizer.php b/src/Normalizer/ImageEditableNormalizer.php index ca668ee1..abecdbd0 100644 --- a/src/Normalizer/ImageEditableNormalizer.php +++ b/src/Normalizer/ImageEditableNormalizer.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Normalizer; use Pimcore\Model\Document\Editable; diff --git a/src/Normalizer/LinkNormalizer.php b/src/Normalizer/LinkNormalizer.php index e0fa784a..92139dfb 100644 --- a/src/Normalizer/LinkNormalizer.php +++ b/src/Normalizer/LinkNormalizer.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Normalizer; use Pimcore\Model\Document\Editable; diff --git a/src/Normalizer/PropertyNormalizerInterface.php b/src/Normalizer/PropertyNormalizerInterface.php index 29bcdb6f..d6ea4b49 100644 --- a/src/Normalizer/PropertyNormalizerInterface.php +++ b/src/Normalizer/PropertyNormalizerInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Normalizer; interface PropertyNormalizerInterface diff --git a/src/Normalizer/ThumbnailNormalizer.php b/src/Normalizer/ThumbnailNormalizer.php index a573f746..aa00da44 100644 --- a/src/Normalizer/ThumbnailNormalizer.php +++ b/src/Normalizer/ThumbnailNormalizer.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Normalizer; use Pimcore\Model\Asset\Image\Thumbnail; diff --git a/src/Provider/StoreProviderInterface.php b/src/Provider/StoreProviderInterface.php index 8a1e9ffb..ae0a70a5 100644 --- a/src/Provider/StoreProviderInterface.php +++ b/src/Provider/StoreProviderInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Provider; interface StoreProviderInterface diff --git a/src/Registry/CalculatorRegistry.php b/src/Registry/CalculatorRegistry.php index 8a8d53b9..d62cc401 100644 --- a/src/Registry/CalculatorRegistry.php +++ b/src/Registry/CalculatorRegistry.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Registry; use ToolboxBundle\Calculator\ColumnCalculatorInterface; diff --git a/src/Registry/CalculatorRegistryInterface.php b/src/Registry/CalculatorRegistryInterface.php index 93e04d9f..a65e3d1c 100644 --- a/src/Registry/CalculatorRegistryInterface.php +++ b/src/Registry/CalculatorRegistryInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Registry; use ToolboxBundle\Calculator\ColumnCalculatorInterface; diff --git a/src/Registry/NormalizerRegistry.php b/src/Registry/NormalizerRegistry.php index 3f5ffb74..9fbd17aa 100644 --- a/src/Registry/NormalizerRegistry.php +++ b/src/Registry/NormalizerRegistry.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Registry; use ToolboxBundle\Normalizer\PropertyNormalizerInterface; diff --git a/src/Registry/NormalizerRegistryInterface.php b/src/Registry/NormalizerRegistryInterface.php index 4f437a71..03eea32d 100644 --- a/src/Registry/NormalizerRegistryInterface.php +++ b/src/Registry/NormalizerRegistryInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Registry; use ToolboxBundle\Normalizer\PropertyNormalizerInterface; diff --git a/src/Registry/StoreProviderRegistry.php b/src/Registry/StoreProviderRegistry.php index b831c37b..d5d056c3 100644 --- a/src/Registry/StoreProviderRegistry.php +++ b/src/Registry/StoreProviderRegistry.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Registry; use ToolboxBundle\Provider\StoreProviderInterface; diff --git a/src/Registry/StoreProviderRegistryInterface.php b/src/Registry/StoreProviderRegistryInterface.php index dce3468d..3b8b0ca8 100644 --- a/src/Registry/StoreProviderRegistryInterface.php +++ b/src/Registry/StoreProviderRegistryInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Registry; use ToolboxBundle\Provider\StoreProviderInterface; diff --git a/src/Resolver/ContextResolver.php b/src/Resolver/ContextResolver.php index be191542..3d285731 100644 --- a/src/Resolver/ContextResolver.php +++ b/src/Resolver/ContextResolver.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Resolver; class ContextResolver implements ContextResolverInterface diff --git a/src/Resolver/ContextResolverInterface.php b/src/Resolver/ContextResolverInterface.php index c4ac36bf..14b09cb0 100644 --- a/src/Resolver/ContextResolverInterface.php +++ b/src/Resolver/ContextResolverInterface.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Resolver; interface ContextResolverInterface diff --git a/src/Service/AssetService.php b/src/Service/AssetService.php index 1fe3ace4..fa0414fe 100644 --- a/src/Service/AssetService.php +++ b/src/Service/AssetService.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Service; use Pimcore\Model\Asset; @@ -74,7 +85,6 @@ private function parseThumbnailPictureList(Asset\Image\Thumbnail $thumbnail, arr $data = []; foreach ($mediaConfigs as $mediaQuery => $config) { - $thumbConfig->setItems($config); $sourceAttributes = $this->getSourceTagAttributes($thumbnail, $thumbConfig, $mediaQuery, $image, $thumbnailOptions); @@ -141,7 +151,6 @@ private function getSrcset(string $fileName, Config $thumbConfig, Image $image, $srcSetValues = []; foreach ([1, 2] as $highRes) { - $thumbConfigRes = clone $thumbConfig; if ($mediaQuery) { diff --git a/src/Service/DataAttributeService.php b/src/Service/DataAttributeService.php index f29eaa00..5f80f6b5 100644 --- a/src/Service/DataAttributeService.php +++ b/src/Service/DataAttributeService.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Service; use ToolboxBundle\Manager\ConfigManagerInterface; diff --git a/src/Service/DownloadInfoService.php b/src/Service/DownloadInfoService.php index 47ce8610..8ab2b169 100644 --- a/src/Service/DownloadInfoService.php +++ b/src/Service/DownloadInfoService.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Service; use Pimcore\Model\Asset; @@ -26,7 +37,6 @@ public function getDownloadInfo( int $fileSizePrecision = 0, bool $showFileNameIfTitleEmpty = false ): array { - if ( $this->bundleConnector->hasBundle('MembersBundle') === true && $this->bundleConnector->getBundleService(\MembersBundle\Manager\RestrictionManager::class)->elementIsInProtectedStorageFolder($download) @@ -54,7 +64,7 @@ public function getDownloadInfo( if ($showPreviewImage) { $metaPreviewImage = $download->getMetadata('previewImage'); - /** @phpstan-ignore-next-line */ + /* @phpstan-ignore-next-line */ if ($metaPreviewImage instanceof Asset\Image) { $dPreviewImage = $metaPreviewImage->getThumbnail($previewThumbName); } elseif ($download instanceof Asset\Image) { @@ -101,6 +111,7 @@ public function getOptimizedFileSize(mixed $bytes, int $precision): string $bytes = $bytes / $step; $i++; } + return round($bytes, $precision) . ' ' . ($units[$i] ?? ''); } } diff --git a/src/Tool/Install.php b/src/Tool/Install.php index 20fafc24..04b6d47c 100644 --- a/src/Tool/Install.php +++ b/src/Tool/Install.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Tool; use Pimcore\Extension\Bundle\Installer\Exception\InstallationException; diff --git a/src/ToolboxBundle.php b/src/ToolboxBundle.php index 29c22111..1d42af30 100644 --- a/src/ToolboxBundle.php +++ b/src/ToolboxBundle.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle; use Pimcore\Extension\Bundle\AbstractPimcoreBundle; diff --git a/src/ToolboxConfig.php b/src/ToolboxConfig.php index 87e38c50..f8d96499 100644 --- a/src/ToolboxConfig.php +++ b/src/ToolboxConfig.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle; final class ToolboxConfig diff --git a/src/ToolboxEvents.php b/src/ToolboxEvents.php index 9e95bde1..1eb199b7 100644 --- a/src/ToolboxEvents.php +++ b/src/ToolboxEvents.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle; class ToolboxEvents diff --git a/src/Twig/Extension/AreaBlockConfigExtension.php b/src/Twig/Extension/AreaBlockConfigExtension.php index c7f9e162..5181243d 100644 --- a/src/Twig/Extension/AreaBlockConfigExtension.php +++ b/src/Twig/Extension/AreaBlockConfigExtension.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Twig\Extension; use Pimcore\Model\Document\Snippet; diff --git a/src/Twig/Extension/DataAttributesExtension.php b/src/Twig/Extension/DataAttributesExtension.php index 23fd5bde..b885f9e3 100644 --- a/src/Twig/Extension/DataAttributesExtension.php +++ b/src/Twig/Extension/DataAttributesExtension.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Twig\Extension; use ToolboxBundle\Service\DataAttributeService; diff --git a/src/Twig/Extension/DocumentEditableExtension.php b/src/Twig/Extension/DocumentEditableExtension.php index 7c4c6c53..12ce148d 100644 --- a/src/Twig/Extension/DocumentEditableExtension.php +++ b/src/Twig/Extension/DocumentEditableExtension.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Twig\Extension; use Twig\TwigFunction; diff --git a/src/Twig/Extension/DownloadExtension.php b/src/Twig/Extension/DownloadExtension.php index 18bbf417..b0171f96 100644 --- a/src/Twig/Extension/DownloadExtension.php +++ b/src/Twig/Extension/DownloadExtension.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Twig\Extension; use ToolboxBundle\Manager\ConfigManagerInterface; diff --git a/src/Twig/Extension/GoogleAPIKeysExtension.php b/src/Twig/Extension/GoogleAPIKeysExtension.php index 4f0e43de..84a62421 100644 --- a/src/Twig/Extension/GoogleAPIKeysExtension.php +++ b/src/Twig/Extension/GoogleAPIKeysExtension.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Twig\Extension; use ToolboxBundle\Manager\ConfigManagerInterface; diff --git a/src/Twig/Extension/ImageThumbnailExtension.php b/src/Twig/Extension/ImageThumbnailExtension.php index bf4069d1..e23ef7e2 100644 --- a/src/Twig/Extension/ImageThumbnailExtension.php +++ b/src/Twig/Extension/ImageThumbnailExtension.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Twig\Extension; use ToolboxBundle\Manager\ConfigManagerInterface; diff --git a/src/Twig/Extension/LayoutExtension.php b/src/Twig/Extension/LayoutExtension.php index f019cbff..2186aa65 100644 --- a/src/Twig/Extension/LayoutExtension.php +++ b/src/Twig/Extension/LayoutExtension.php @@ -1,5 +1,16 @@ <?php +/* + * This source file is available under two different licenses: + * - GNU General Public License version 3 (GPLv3) + * - DACHCOM Commercial License (DCL) + * Full copyright and license information is available in + * LICENSE.md which is distributed with this source code. + * + * @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com) + * @license GPLv3 and DCL + */ + namespace ToolboxBundle\Twig\Extension; use ToolboxBundle\Manager\LayoutManager;