AWS Community Day CPH - Three problems of Terraform
что нового в мире Services
1. Drupal 7 routing
● based on path only (menu_get_item($path))
● tied up with menu links (tables menu_router,
menu_links)
2. menu_rebuild()
● This function will clear and populate the
{menu_router} table, add entries to {menu_links}
for new router items, and then remove stale
items from {menu_links}. If called from
update.php or install.php, it will also schedule a
call to itself on the first real page load from
menu_execute_active_handler(), because the
maintenance page environment is different and
leaves stale data in the menu tables.
10. router.dynamic internals
● RouteProvider – fetch all records from {router}
table filtering by pattern_outline,
● NestedMatcher:
– MimeTypeMatcher
– UrlMatcher:
● prefix
● regex (example #^/node$#s)
● host regex
● http method
● http scheme (http or https)
11. legacy_router internals
● NullGenerator
● LegacyUrlMatcher
– menu_get_item($path)
– Convert it to Route
● _controller is callback function name
● hook_menu 'file' got included
12. REST in core
● New Entity API with field metadata
● REST API support can be enabled for any
entity known to the system
● Access control on the entity level
● Access control on the field level
20. CSRF protection
● Each non-safe REST call (not GET, HEAD,
OPTIONS, TRACE methods) should be done
with 'X-CSRF-Token' header with token.
21. Services in Drupal 8
● Own plugin (extends Resource from REST)
● Each method as own route (not tied with http
method names)
● Use annotations to describe your routes