[go: up one dir, main page]

0% found this document useful (0 votes)
11 views2 pages

Drupal Interview Advanced

The document outlines advanced Drupal development techniques, including creating custom REST API endpoints, services, and event subscribers. It also discusses caching layers, content migration processes, site security measures, and handling multilingual sites. Key steps and configurations are provided for each topic to guide developers with 3-4 years of experience.

Uploaded by

rajeshb28898
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Drupal Interview Advanced

The document outlines advanced Drupal development techniques, including creating custom REST API endpoints, services, and event subscribers. It also discusses caching layers, content migration processes, site security measures, and handling multilingual sites. Key steps and configurations are provided for each topic to guide developers with 3-4 years of experience.

Uploaded by

rajeshb28898
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Advanced Level (3-4 Years Experience)

13. How do you create a custom REST API endpoint?

- Define a route in `MODULE.routing.yml`

- Create a controller class that returns JSON

- Add `_permission` and `_format` to the route definition

14. How do you create and use services?

- Define the service in `MODULE.services.yml`

- Create a class that implements the service logic

- Inject the service into controllers or plugins using Dependency Injection

15. What is an Event Subscriber? How is it different from a Hook?

An Event Subscriber is an OOP method to respond to system events using the Symfony event

system. Unlike hooks, it allows multiple listeners with execution priority.

16. What are the caching layers in Drupal?

- Page Cache (anonymous users)

- Dynamic Page Cache (for all users)

- Render Cache (stores render arrays)

- Twig Cache (compiled templates)

17. How do you perform a content migration?

- Use Migrate, Migrate Plus, and Migrate Tools modules

- Define source, process, and destination in YAML files

- Use `drush migrate-import` and `migrate-status` to run and monitor


18. How do you migrate files or media and reference them?

- First, migrate files/media entities

- Then reference them in content using `migration_lookup` in process plugins

19. How do you secure a Drupal site?

- Keep modules/core updated

- Use correct file permissions

- Limit user permissions

- Use HTTPS

- Enable security modules like Security Kit

- Validate/sanitize all inputs

20. How do you handle multilingual sites?

- Enable Language, Content Translation, and Interface Translation modules

- Configure language negotiation

- Enable translation per content type or field

You might also like