- Drupal 8 Module Development
- Daniel Sipos
- 202字
- 2021-07-02 15:45:10
Routing
It all starts with a route, doesn't it? Any interaction with a Drupal 8 website has its beginning in a user (or system) accessing a certain path (or resource). This translates into a route, which maps that resource to a flow that (hopefully) returns a successful response back or at least a graceful failure.
The Drupal 8 routing system is a major shift away from how it was in its previous versions. In Drupal 7 and earlier versions, the routing system was a very Drupal-specific thing (a drupalism, if you will). Many of us remember hook_menu as a staple hook each Drupal developer had to know very well. All of that has been abandoned in Drupal 8 in favor of the Symfony Routing component (http://symfony.com/doc/current/components/routing.html). Also, since I mentioned hook_menu, I will also mention that its other main functions have also been taken over in Drupal 8 by other subsystems, such as plugins.
In this book, we will see how we can define our own route and map it to a controller that will render our page. We will cover a few of the more important route options and take a look at how we can control access to these routes.
- Mastering AWS Lambda
- 工程軟件開發技術基礎
- Python自動化運維快速入門(第2版)
- Visual Basic程序設計(第3版):學習指導與練習
- Magento 2 Development Cookbook
- PHP+MySQL+Dreamweaver動態網站開發實例教程
- Rust Essentials(Second Edition)
- Nginx Lua開發實戰
- Learning PHP 7
- Visual Studio Code 權威指南
- Instant Zurb Foundation 4
- Elasticsearch搜索引擎構建入門與實戰
- 計算機應用基礎(Windows 7+Office 2010)
- 一步一步學Spring Boot:微服務項目實戰(第2版)
- 嵌入式Linux C語言程序設計基礎教程(微課版)