- Drupal 8 Module Development
- Daniel Sipos
- 207字
- 2021-07-02 12:22:34
Routing
It all starts with a route, doesn't it? Most interactions with a Drupal 8 website begin with 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 used to be in its previous versions. In Drupal 7 and before, 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 Chapter 2, Creating Your First Module, 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.
- 玩轉(zhuǎn)Scratch少兒趣味編程
- Getting Started with ResearchKit
- 技術(shù)領(lǐng)導(dǎo)力:程序員如何才能帶團隊
- Scratch 3.0少兒編程與邏輯思維訓(xùn)練
- Web程序設(shè)計(第二版)
- TypeScript項目開發(fā)實戰(zhàn)
- Learning Salesforce Einstein
- Mastering Apache Maven 3
- Scientific Computing with Scala
- Raspberry Pi Home Automation with Arduino(Second Edition)
- Creating Stunning Dashboards with QlikView
- Unity 3D腳本編程:使用C#語言開發(fā)跨平臺游戲
- 深入解析Java編譯器:源碼剖析與實例詳解
- Secret Recipes of the Python Ninja
- 算法秘籍