{"id":24292343,"url":"https://github.com/loremipsum/route-generator-bundle","last_synced_at":"2025-07-18T18:32:22.379Z","repository":{"id":62519070,"uuid":"163271898","full_name":"loremipsum/route-generator-bundle","owner":"loremipsum","description":"Symfony bundle to create routes to resources.","archived":false,"fork":false,"pushed_at":"2019-04-23T12:02:41.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T14:32:54.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loremipsum.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-27T09:00:21.000Z","updated_at":"2019-04-23T12:02:09.000Z","dependencies_parsed_at":"2022-11-02T14:00:17.679Z","dependency_job_id":null,"html_url":"https://github.com/loremipsum/route-generator-bundle","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/loremipsum/route-generator-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loremipsum%2Froute-generator-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loremipsum%2Froute-generator-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loremipsum%2Froute-generator-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loremipsum%2Froute-generator-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loremipsum","download_url":"https://codeload.github.com/loremipsum/route-generator-bundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loremipsum%2Froute-generator-bundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265810000,"owners_count":23831945,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-16T15:29:41.533Z","updated_at":"2025-07-18T18:32:22.361Z","avatar_url":"https://github.com/loremipsum.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RouteGenerator bundle\n\nSymfony bundle to create routes to resources.\n\n## Example route handler\n\n```php\n\u003c?php\n\nnamespace App\\RouteHandlers;\n\nuse App\\Entity\\User;\nuse LoremIpsum\\RouteGeneratorBundle\\Model\\RouteHandlerInterface;\nuse Symfony\\Component\\Routing\\RouterInterface;\n\nclass DefaultRouteHandler implements RouteHandlerInterface\n{\n    protected $router;\n\n    public function __construct(RouterInterface $router)\n    {\n        $this-\u003erouter = $router;\n    }\n\n    public function handle($value, $view = null, $context = [])\n    {\n        if ($value instanceof User) {\n            return $this-\u003erouter-\u003egenerate('userView', array_merge(['user' =\u003e $value-\u003egetId()], $context));\n        }\n        return null;\n    }\n}\n```\n\n## Example usage\n\n```\n{% if \u003centity\u003e is routable %}\n    \u003ca href=\"{{ pathTo(\u003centity\u003e) }}\"\u003e{{ \u003centity\u003e }}\u003c/a\u003e\n{% else %}\n    {{ \u003centity\u003e }}\n{% endif %}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floremipsum%2Froute-generator-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floremipsum%2Froute-generator-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floremipsum%2Froute-generator-bundle/lists"}