By grevil on
Change record status:
Draft (View all draft change records)
Project:
Introduced in branch:
8.x-4.x
Introduced in version:
8.x-4.0-beta6
Issue links:
Description:
The flag theme does not contain any information on the "flaggable" view mode. This prevents the user from building conditional logic in the theming layer.
As a result, both Drupal\flag\ActionLink\ActionLinkTypeBase::getAsLink() and getAsFlagLink() now need to get called with a third "$view_mode" parameter to enable conditional logic in the theming layer.
Before:
$this->flagLinkBuilder->build($entity->getEntityTypeId(), $entity->id(), $this->getFlag()->id());
After:
$this->flagLinkBuilder->build($entity->getEntityTypeId(), $entity->id(), $this->getFlag()->id(), 'default');
Impacts:
Module developers
Themers