private function mergePresetAttachableObjects($data)
    {
        if (is_string($data)) {
            $groupIdent = $data;
            if ($this instanceof ObjectContainerInterface) {
                if ($this->hasObj()) {
                    $groupIdent = $this->obj()->render($groupIdent);
                }
            } elseif ($this instanceof ModelInterface) {
                $groupIdent = $this->render($groupIdent);
            }

            $presetGroups = $this->config('groups');
            if (isset($presetGroups[$groupIdent])) {
                $data = $presetGroups[$groupIdent];
            }
        }

        if (is_array($data)) {
            $presetTypes = $this->config('attachables');
            $attachables = [];
            foreach ($data as $attType => $attStruct) {
                if (is_string($attStruct)) {
                    $attType   = $attStruct;
                    $attStruct = [];
                }

                if (!is_string($attType)) {
                    throw new InvalidArgumentException(
                        'The attachment type must be a string'
                    );
                }

                if (!is_array($attStruct)) {
                    throw new InvalidArgumentException(sprintf(
                        'The attachment structure for "%s" must be an array',
                        $attType
                    ));
                }

                if (isset($presetTypes[$attType])) {
                    $attStruct = array_replace_recursive(
                        $presetTypes[$attType],
                        $attStruct
                    );
                }

                $attachables[$attType] = $attStruct;
            }

            $data = $attachables;
        }

        return $data;
    }