Resolve includes for transformer.

@param  string  $group
@param  array  $data
@param  mixed  $parameters

@return array
515688
protected function transformByMeta(string $meta, array $data, ...$parameters): array
    {
        $name = Str::singular($meta);
        $types = $this->options[$meta];

        if (empty($types)) {
            return $data;
        }

        foreach ($types as $type => $index) {
            if (is_array($type)) {
                continue;
            }

            $method = $name.Str::studly($type);

            if (method_exists($this, $method)) {
                $data = $this->{$method}($data, ...$parameters);
            }
        }

        return $data;
    }
873788
public function resolveSerializer($resource, array $parameters = [], $version = null)
    {
        return $this->resolve('serializer', $resource, $parameters, $version);
    }
304452
public function deserialize($data, WorkspaceTeamParameters $parameters, array $options = [])
    {
        if (!in_array(Options::REFRESH_UUID, $options)) {
            $parameters->setUuid($data['id']);
        }

        $this->sipe('selfRegistration', 'setSelfRegistration', $data, $parameters);
        $this->sipe('selfUnregistration', 'setSelfUnregistration', $data, $parameters);
        $this->sipe('publicDirectory', 'setIsPublic', $data, $parameters);
        $this->sipe('deletableDirectory', 'setDirDeletable', $data, $parameters);
        $this->sipe('allowedTeams', 'setMaxTeams', $data, $parameters);

        if (isset($data['workspace']['uuid'])) {
            $workspace = $this->workspaceRepo->findOneBy(['uuid' => $data['workspace']['uuid']]);

            if ($workspace) {
                $parameters->setWorkspace($workspace);
            }
        }

        return $parameters;
    }
430020
public static function pathsToPublish($provider = null, $group = null)
	{
		if ($group && array_key_exists($group, static::$publishGroups))
		{
			return static::$publishGroups[$group];
		}

		if ($provider && array_key_exists($provider, static::$publishes))
		{
			return static::$publishes[$provider];
		}

		if ($group || $provider)
		{
			return [];
		}

		$paths = [];

		foreach (static::$publishes as $class => $publish)
		{
			$paths = array_merge($paths, $publish);
		}

		return $paths;
	}
951206
private function includeResourceIfAvailable(
        Scope $scope,
        $data,
        $includedData,
        $include
    ) {
        if ($resource = $this->callIncludeMethod($scope, $include, $data)) {
            $childScope = $scope->embedChildScope($include, $resource);

            if ($childScope->getResource() instanceof Primitive) {
                $includedData[$include] = $childScope->transformPrimitiveResource();
            } else {
                $includedData[$include] = $childScope->toArray();
            }
        }

        return $includedData;
    }
933447
protected static function pathsForProviderOrGroup($provider, $group)
    {
        if ($provider && $group) {
            return static::pathsForProviderAndGroup($provider, $group);
        } elseif ($group && array_key_exists($group, static::$publishGroups)) {
            return static::$publishGroups[$group];
        } elseif ($provider && array_key_exists($provider, static::$publishes)) {
            return static::$publishes[$provider];
        } elseif ($group || $provider) {
            return [];
        }
    }
824313
protected function fireIncludedTransformers($transformer, $data)
    {
        $this->availableIncludes = $transformer->getAvailableIncludes();

        return $transformer->processIncludedResources($this, $data) ?: [];
    }
890136
public function all($group_id = null, array $parameters = [])
    {
        $resolver = $this->createOptionsResolver();

        $path = $group_id === null ? 'boards' : $this->getGroupPath($group_id, 'boards');

        return $this->get($path, $resolver->resolve($parameters));
    }
54486
private function resolveRouteParameters(array $parameters, $data)
    {
        $routeParameters = [];

        foreach ($parameters as $parameter) {
            $routeParameters[$parameter] = $this->propertyAccessor->getValue($data, $parameter);
        }

        return $routeParameters;
    }
841054
public function solveResolutions(array $data)
    {
        return null !== $this->resolutionManager
            ? $this->resolutionManager->solveResolutions($data)
            : $data;
    }
987533
public function deserialize($data, Group $group = null, array $options = [])
    {
        $this->sipe('name', 'setName', $data, $group);

        if (isset($data['organizations'])) {
            $group->setOrganizations(
                array_map(function ($organization) {
                    return $this->om->getObject($organization, Organization::class);
                }, $data['organizations'])
            );
        }

        //only add role here. If we want to remove them, use the crud remove method instead
        //it's usefull if we want to create a user with a list of roles
        if (isset($data['roles'])) {
            foreach ($data['roles'] as $role) {
                $role = $this->om->getObject($role, Role::class);
                if ($role && $role->getId()) {
                    $group->addRole($role);
                }
            }
        }

        return $group;
    }
912370
public function resolveMethodDependencies(array $parameters, ReflectionFunctionAbstract $reflector)
    {
        foreach ($reflector->getParameters() as $key => $parameter) {
            $instance = $this->transformDependency($parameter, $parameters);

            if (!is_null($instance)) {
                $this->spliceIntoParameters($parameters, $key, $instance);
            }
        }

        return $parameters;
    }
821160
public function serialize($data, $group = null)
    {
        $context = new SerializationContext();

        if ($group) {
            $context->setGroups($group);
        }

        return $this->serializer->serialize($data, 'json', $context);
    }
104273
protected function pullOutNestedIncludedData(array $data)
    {
        $includedData = [];
        $linkedIds = [];

        foreach ($data as $value) {
            foreach ($value as $includeObject) {
                if (isset($includeObject['included'])) {
                    list($includedData, $linkedIds) = $this->serializeIncludedObjectsWithCacheKey($includeObject['included'], $linkedIds, $includedData);
                }
            }
        }

        return [$includedData, $linkedIds];
    }
822262
public static String resolve(
            final Map<String, Map<String, String>> data, final String group,
            final String key,
            final String defaultValue
    )
    {
        return null != data && null != data.get(group) && null != data.get(group).get(key)
        ? data.get(group).get(key)
        : defaultValue;
    }
654250
protected function resolveQueueableEntities($data)
	{
		if (is_string($data)) {
			return $this->resolveQueueableEntity($data);
		}

		if (is_array($data)) {
			$data = array_map(function ($d) {
				if (is_array($d)) {
					return $this->resolveQueueableEntities($d);
				}

				return $this->resolveQueueableEntity($d);
			}, $data);
		}

		return $data;
	}
609950
public function normalize($data, $attributes = null, $groups = null, $entityMethods = null)
    {
        $context = $this->getNormalizeContext($this->normalizeContext, $attributes, $groups);

        $dataNormalized = $this->serializer->normalize($data, null, $context);

        if ($entityMethods && count($entityMethods) > 0) {
            $dataNormalized = $this->mergeEntitiesMethods($data, $dataNormalized, $entityMethods);
        }

        return $dataNormalized;
    }