Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/1.8' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mcop1 committed Nov 7, 2024
2 parents 0e87996 + 5195a8c commit cdcd994
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/GraphQL/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
use Pimcore\Model\Factory;
use Pimcore\Translation\Translator;
use Psr\Container\ContainerInterface;
use stdClass;

class Service
{
Expand Down Expand Up @@ -797,8 +796,11 @@ public function getPropertyTypeDefinition($typeName)
* @param string|null $brickType
* @param string|null $brickKey
* @param Data|null $fieldDefinition
* @param array $context
* @param array|null $brickDescriptor
* @param array $args
*
* @return stdclass, value and objectid where the value comes from
* @return mixed
*/
public static function getValueForObject($object, $key, $brickType = null, $brickKey = null, $fieldDefinition = null, $context = [], $brickDescriptor = null, $args = [])
{
Expand Down Expand Up @@ -853,7 +855,7 @@ public static function getValueForObject($object, $key, $brickType = null, $bric
* @param string $attribute
* @param \Closure $callback
*
* @return stdclass|null
* @return mixed result of the callback
*
* @throws \Exception
*/
Expand Down Expand Up @@ -1177,9 +1179,9 @@ public static function getValueFromObjectBrick(
Concrete $object,
string $brickType,
string $brickKey,
string $brickDescriptor = null,
?array $brickDescriptor = null,
array $descriptorData = [],
): stdClass|array|null {
): mixed {
$context = ['object' => $object];

$key = \Pimcore\Model\DataObject\Service::getFieldForBrickType($object->getclass(), $brickType);
Expand All @@ -1203,7 +1205,8 @@ public static function getValueFromObjectBrick(
$def,
$context,
$brickDescriptor,
$descriptorData['args'] ?? []);
$descriptorData['args'] ?? []
);
}

return null;
Expand Down

0 comments on commit cdcd994

Please sign in to comment.