Skip to main content
4 events
when toggle format what by license comment
Jun 6, 2018 at 9:03 comment added Manav if you want to use flag in your custom file then use this code: $variables['variable_name'] = [ '#lazy_builder' => ['flag.link_builder:build', [ $entity->getEntityTypeId(), $entity->Id(), 'flag_name' ]], '#create_placeholder' => TRUE, ]; Here $entity->getEntityTypeId() is entity type like 'node', 'user', 'coment' $entity->Id(), is id of the content like 'nid', 'uid', 'cid' etc flag_name is name of the flag which you have created. For more infor please follwot this link : (drupal.org/node/295383)
Feb 8, 2016 at 8:01 comment added Berdir You probably want to follow drupal.org/node/2463365
Feb 8, 2016 at 7:59 comment added Berdir Have you tried that with different users and caching enabled? This will likely be cached unless you disable caching completely for different users.
Feb 6, 2016 at 18:10 history answered Brent Kerby CC BY-SA 3.0