How to flag an entity when it is created or updated ?

I have a Drupal 8 site with the Flag module.

I want when a user creates or updates a node, product, store, group, ... the updated entity is flagged.

How to flag an entity when it is created or updated ?

I'm testing the "Rules" module which is finally (usable) in production.

But how do you flag down a new entity when it is created ?

What should be put in "Action", because it is no longer like in Drual 7 with an interface.

https://i.stack.imgur.com/jFPLB.png

Connecting custom content types to the main menu using Twig template

I created a content type with the name 'Brand' and a field that contains three categories which are separate pages on the website. Each of those categories are also shown in the menu. Now I want to create a submenu below each category in the menu where the 'Brand' pages are shown which are connected to the selected category. Is there a way to do this in Twig?

Currently I have the following template where I want to show the items.

OHM Advisors

OHM Advisors Homepage

OHM Advisors is a community-oriented architecture and engineering firm with offices across the US Midwest. Chapter Three was engaged to do a full redesign and migration to Drupal 8 from Wordpress. In addition to a move to a new technical platform, key business needs included a much bolder visual and design system, and a revamped approach to content, which we helped make a bold visual and storytelling statement from one of the Midwest’s leading architecture and engineering firms.

Sectors: 
Enterprise
Real Estate
Urban planning

History Factory's COVID-19 Corporate Memory Project

Homepage for History Factory's COVID-19 Corporate Memory Project

Drupal Captures History in Real-Time

The teams at History Factory and Mediacurrent created a solution to capture real-time history of the COVID-19 pandemic for future crisis responses. 

Sectors: 
Non-profit

History Factory's COVID-19 Corporate Memory Project

Homepage for History Factory's COVID-19 Corporate Memory Project

Using Drupal to Capture History in Real-Time

The teams at History Factory and Mediacurrent created a solution to capture real-time history of the COVID-19 pandemic for future crisis responses. 

Sectors: 
Non-profit

Using hook_entity_view_alter(), want to change the filed's title(label) with certain display_id

I've been trying to display netId through the display on the view.

So, I used hook_entity_view_alter to alter the title of the field and the field_content to be the netId.

But it doesn't seem to be working.
So, my question is 

1) Is $display->id() a machine_name of the display?

2) Is there any better way to go about?

function directories_entity_view_alter(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display) {

  if ($display->id() != 'team_directory') {

    return;

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x