getLinkForClass example



                $varDoc = $varDoc[0];
                $type = (string) $varDoc->getType();
            } else {
                $type = $propertyType->getName();
            }

            $availableData[] = [
                'name' => $property->getName(),
                'type' => $type,
                'link' => $this->serviceReferenceGenerator->getLinkForClass($type),
            ];
        }

        return $availableData;
    }

    /** * @param \ReflectionClass<Hook> $reflection * * @return list<array<string, ?string>> */
    
// skip @internal classes                 continue;
            }

            /** @var Deprecated|null $deprecated */
            $deprecated = $docBlock->getTagsByName('deprecated')[0] ?? null;

            $group = $this->getGroupForService($reflection);

            $data[$group]['services'][] = [
                'name' => $this->getName($service),
                'link' => $this->getLinkForClass($service),
                // add fragment-marker to easily link to specific classes, see https://stackoverflow.com/a/54335742/10064036                 // as `{#` indicates a twig comment, we can't add it inside the template                 'marker' => '{#' . strtolower($reflection->getShortName()) . '}',
                'deprecated' => $deprecated ? (string) $deprecated : null,
                'summary' => $docBlock->getSummary(),
                'description' => $docBlock->getDescription()->render(),
                'methods' => $this->getMethods($reflection$scriptServices),
            ];
        }

        return $data;
    }
Home | Imprint | This part of the site doesn't use cookies.