Skip to content

Commit

Permalink
Apply php-cs-fixer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aweichler authored and github-actions[bot] committed Jun 13, 2024
1 parent 305c1c2 commit d917945
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 8 additions & 10 deletions src/Controller/ClassController.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,9 @@ private function considerClassificationStoreForColumnConfig(Request $request, ?D
}
}


if ($displayMode == ColumnConfigDisplayMode::ALL && $grouped === true) {
$class->setFieldDefinitions($fieldDefinitions);
$classString = "Pimcore\\Model\\DataObject\\" . $class->getName();
$classString = 'Pimcore\\Model\\DataObject\\' . $class->getName();
$targetObjectId = intval($request->get('target_oid'));
$targetObject = DataObject\Concrete::getById($targetObjectId);
$tmpObject = new $classString();
Expand All @@ -160,22 +159,22 @@ private function considerClassificationStoreForColumnConfig(Request $request, ?D
if (!$fieldDefinition instanceof DataObject\ClassDefinition\Data\Classificationstore) {
continue;
}

$storeId = $fieldDefinition->getStoreId();
$store = new DataObject\Classificationstore();

$groupIds = [];
$sql = "SELECT `id` FROM `classificationstore_groups`";
$sql = 'SELECT `id` FROM `classificationstore_groups`';
if ($storeId > 0) {
$sql = "SELECT `id` FROM `classificationstore_groups` WHERE `storeId` = " . intval($storeId);
$sql = 'SELECT `id` FROM `classificationstore_groups` WHERE `storeId` = ' . intval($storeId);
}

$queryResult = $db->executeQuery($sql);

while ($row = $queryResult->fetchAssociative()) {
$groupIds[intval($row['id'])] = true;
}

$event = new Event\GroupClassificationStoreEvent($targetObject, $tmpObject, $fieldDefinition, $groupIds, $storeId);
$eventDispatcher->dispatch($event, Event\OutputDataConfigToolkitEvents::GROUP_CLASSIFICATION_STORE_EVENT);

Expand All @@ -185,7 +184,7 @@ private function considerClassificationStoreForColumnConfig(Request $request, ?D
$store->setObject($tmpObject);
$tmpObject->set($fieldDefinition->getName(), $store);
}

DataObject\Service::enrichLayoutDefinition($result['objectColumns']['children'][0], $tmpObject);
}

Expand Down Expand Up @@ -237,12 +236,11 @@ public function setClassificationGroupedDisplay(bool $grouped)
}

/**
*
*
* @return bool
*/
public function getClassificationGroupedDisplay(): bool
{
return $this->classificationGroupedDisplay;
}

}
3 changes: 1 addition & 2 deletions src/Event/GroupClassificationStoreEvent.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?php


/**
* Pimcore.
* Pimcore
*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
Expand Down

0 comments on commit d917945

Please sign in to comment.