Skip to content

[CS] Refactor #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/Builder/AbstractConfigBuilder.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -139,5 +149,4 @@ private function checkColumnAdjusterField(string $brickId, ?string $tab, array $

return $editableNodes;
}

}
12 changes: 11 additions & 1 deletion src/Builder/BrickConfigBuilder.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
11 changes: 11 additions & 0 deletions src/Builder/BrickConfigBuilderInterface.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
13 changes: 11 additions & 2 deletions src/Builder/InlineConfigBuilder.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);

Expand All @@ -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);
Expand Down
11 changes: 11 additions & 0 deletions src/Builder/InlineConfigBuilderInterface.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/Calculator/Bootstrap3/ColumnCalculator.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/Calculator/Bootstrap3/SlideColumnCalculator.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
13 changes: 12 additions & 1 deletion src/Calculator/Bootstrap4/ColumnCalculator.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/Calculator/Bootstrap4/SlideColumnCalculator.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/Calculator/ColumnCalculatorInterface.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/Calculator/SlideColumnCalculatorInterface.php
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 11 additions & 0 deletions src/Calculator/UIkit3/ColumnCalculator.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/Calculator/UIkit3/SlideColumnCalculator.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
13 changes: 11 additions & 2 deletions src/Command/AreaConfigurationCommand.php
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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
{
Expand Down
11 changes: 11 additions & 0 deletions src/Connector/BundleConnector.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/Controller/Admin/ColumnAdjusterController.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
11 changes: 11 additions & 0 deletions src/Controller/Admin/SettingsController.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
13 changes: 12 additions & 1 deletion src/Controller/AjaxController.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
13 changes: 12 additions & 1 deletion src/Controller/HeadlessController.php
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Loading
Loading