Introduce API for getting the /ce-api URL

Created on 7 March 2023, about 2 years ago
Updated 14 January 2025, 3 months ago

Problem/Motivation

Give a $entity, how to generate the API-path of it?

'/ce-api/' . $entity->toUrl() works but is not exactly nice or flexible.
/ce-api might change, and integration modules might alter the API for a given $entity in a multi-frontend scenariou.

Proposed resolution

$entity->toUrl('canonical', ['ce_api' => TRUE]
or
$entity->toUrl('canonical', ['_format' => 'custom_elements']

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇦🇹Austria fago Vienna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024