Problem/Motivation

I think there could be some cases when we have to get just the entity contextual links without having to view/build the entity.

Comments

peximo created an issue. See original summary.

peximo’s picture

plach’s picture

Status: Active » Reviewed & tested by the community

In the project we are working on we are generating contextual links to embed them in a SPA to make it possible to perform contextual editing.

I'm not sure whether we need explicit test coverage for this change, since we don't check the visibility of every single method out there. We may or may not want to add an @api marker to the PHP doc. Tentatively marking RTBC.

fabianx’s picture

RTBC + 1 - The module using this is called `spa_admin` on d.org: https://www.drupal.org/project/spa_admin

plach’s picture

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: entity-add-contextual-links-method-3267586.2.patch, failed testing. View results

plach’s picture

Status: Needs work » Reviewed & tested by the community

Bot fluke

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: entity-add-contextual-links-method-3267586.2.patch, failed testing. View results

plach’s picture

Status: Needs work » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: entity-add-contextual-links-method-3267586.2.patch, failed testing. View results

ravi.shankar’s picture

Status: Needs work » Reviewed & tested by the community

Back to RTBC as per comment #3.

catch’s picture

Status: Reviewed & tested by the community » Needs review

Should this be added to an interface somewhere? Either one of the ones that EntityViewBuilder already implements, or a new one?

Or alternatively could it be moved to a trait, then that trait added to EntityViewBuilder? It doesn't have any dependencies on the rest of the class as far as I can tell.

smustgrave’s picture

Status: Needs review » Needs work

Think adding it to the EntityViewBuilderInterface should work right?

smustgrave’s picture

Version: 10.0.x-dev » 10.1.x-dev
StatusFileSize
new1.25 KB
new1.61 KB

Like this?

smustgrave’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 14: 3267586-14.patch, failed testing. View results

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.