官术网_书友最值得收藏!

Forms

Unless your site has three pages and five paragraphs of text, the likelihood that you will need to capture user input via some type of form is very high. Also, if you've been coding PHP applications, you know how forms have always been a pain from the point of view of securely and efficiently rendering and processing the submitted data. As soon as you use a PHP framework such as Symfony, you will note that an API is in place to take much of that load off your shoulders.

The same goes with Drupal 8 and its powerful Form API. Historically, it has been a great abstraction over having to output your own form elements and deal with posted values. It allows you to define your own form definition in OOP and handle validation and submission in a logical way. Its render and processing is taken care of by Drupal securely, so you don't have to worry about any of that. In Drupal 8, theming form elements have become much easier than in previous versions.

In this book, we will encounter some forms and see how they actually work in practice.

主站蜘蛛池模板: 抚州市| 区。| 锦州市| 眉山市| 南召县| 凤庆县| 江西省| 宁国市| 原平市| 平远县| 尚义县| 防城港市| 襄汾县| 都兰县| 榆社县| 且末县| 青海省| 昂仁县| 琼海市| 徐水县| 大荔县| 贺州市| 扬州市| 巴楚县| 德州市| 大兴区| 即墨市| 余庆县| 惠东县| 泰顺县| 新河县| 烟台市| 图们市| 哈巴河县| 大冶市| 南通市| 红桥区| 基隆市| 霞浦县| 绥德县| 海阳市|