Skip to main content
4uk4's user avatar
4uk4's user avatar
4uk4's user avatar
4uk4
  • Member for 9 years, 1 month
  • Last seen this week
  • Germany
105 votes
Accepted

How to check if field exists in an entity?

86 votes
Accepted

How can I get the path alias from a node ID or node object?

68 votes
Accepted

How to get the valid URL of a Link field from within a Twig template?

55 votes

How to load a node by a field value?

50 votes

How can I programmatically render a node's field respecting the view mode settings?

49 votes
Accepted

How to get formatted date string from a DateTimeItem object

48 votes
Accepted

How do I pass parameters to the form builder?

45 votes
Accepted

Rendering an image field in page.html.twig with a custom image style

44 votes

How to get $_POST and $_GET parameters

42 votes

Programmatically redirect users to the default "access restricted"

37 votes
Accepted

How to get an array of referenced entity ids from an entity reference field

36 votes
Accepted

Get the image URL

34 votes
Accepted

Perform a query with an entity field condition with multiple values

33 votes
Accepted

How to create a redirection programmatically?

33 votes
Accepted

how to get parent tids of a taxonomy term

32 votes
Accepted

Create unordered list in render array

31 votes
Accepted

How to get an image URL from a field in a twig template

31 votes
Accepted

if string contains substring twig

30 votes

How to embed drupal content in other sites (remove X-Frame-Options: SAMEORIGIN)?

29 votes
Accepted

Use drush to put a site in maintenance mode

28 votes
Accepted

How do I disable Twig and block cache for a specific module?

28 votes
Accepted

Best practice: $this->t() versus t()

27 votes

How do I set the cookie lifetime?

26 votes
Accepted

How can I add items to the Admin Toolbar?

26 votes
Accepted

How can I upload files with the form element type file?

25 votes
Accepted

Iterate through multiple value content field in Twig template

24 votes
Accepted

How do I programmatically update the allowed values of a list field?

23 votes
Accepted

How do I use dependency injection on \Drupal::moduleHandler() to a Controller?

23 votes

Get the list of available services

23 votes
Accepted

\Drupal::request() vs $request_stack->getCurrentRequest()

1
2 3 4 5
75