Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional derivers for menu links. #51

Open
Jaesin opened this issue Feb 23, 2016 · 2 comments
Open

Add optional derivers for menu links. #51

Jaesin opened this issue Feb 23, 2016 · 2 comments

Comments

@Jaesin
Copy link
Owner

Jaesin commented Feb 23, 2016

The goal of this project has always been to minimize the technical requirements to create a fully capable content entity. This is another task in the spirit of removing complexity for the most basic use case while maintaining a path for extensible entities.

The goad is to add derivers so the following link yamls are optional:

  1. foo.links.action.yml
  2. foo.links.task.yml
  3. foo.links.menu.yml
@Jaesin
Copy link
Owner Author

Jaesin commented Feb 23, 2016

See: https://www.drupal.org/node/2122253

example.local_tasks:
  deriver: 'Drupal\example\Plugin\Derivative\DynamicLocalTasks'
  weight: 100

The deriver should be optional for a given entity because an entity might want to override the menu items. They should check for a local_task_provider entity handler that would supply the local tasks. The default provider should be in the content_entity_base module.

See #50

@Jaesin
Copy link
Owner Author

Jaesin commented Feb 23, 2016

Something like:

 *   handlers = {
 *     "link_provider" = {
 *       "action" = "\Drupal\content_entity_base\Entity\Link\EntityActionLinkProvider",
 *       "menu"   = "\Drupal\content_entity_base\Entity\Link\EntityMenuLinkProvider",
 *       "task"   = "\Drupal\content_entity_base\Entity\Link\EntityTaskLinkProvider",
 *     },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant