توضیحاتی در مورد کتاب Drupal 8 Module Development: Build and customize Drupal 8 modules and extensions efficiently
نام کتاب : Drupal 8 Module Development: Build and customize Drupal 8 modules and extensions efficiently
عنوان ترجمه شده به فارسی : توسعه ماژول دروپال 8: ماژول ها و افزونه های دروپال 8 را به طور موثر بسازید و سفارشی کنید
سری :
نویسندگان : Daniel Sipos
ناشر : Packt Publishing Ltd
سال نشر : 2017
تعداد صفحات : 559
ISBN (شابک) : 9781782168782 , 1782168788
زبان کتاب : English
فرمت کتاب : pdf
حجم کتاب : 5 مگابایت
بعد از تکمیل فرایند پرداخت لینک دانلود کتاب ارائه خواهد شد. درصورت ثبت نام و ورود به حساب کاربری خود قادر خواهید بود لیست کتاب های خریداری شده را مشاهده فرمایید.
فهرست مطالب :
Cover
Copyright
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Table of Contents
Preface
Chapter 1: Developing for Drupal 8
Introducing Drupal (for developers)
Developing for Drupal 8
Technologies that drive Drupal
PHP
Databases and MySQL
The web server
HTML, CSS, and JavaScript
Drupal architecture
Drupal core, modules, and themes
Hooks, plugins, and events
Services and the dependency injection container
From request to response
Drupal\'s major subsystems
Routing
Entities
Fields
Menus
Views
Forms
Configuration
Plugins
The theme system
Caching
Other subsystems
Tools for developing in Drupal
Version control
Composer
The API site and coding standards
The developer (Devel) module
Drush (the Drupal shell)
Drupal Console
Developer settings
Summary
Chapter 2: Creating Your First Module
Creating a module
Your first hook implementation
Route and controller
The route
Route variables
Namespaces
The Controller
Services
What is a service?
The HelloWorldSalutation service
Tagged services
Using services in Drupal 8
Injecting the service into our Controller
The form
Altering forms
Custom submit handlers
Rendering forms
Service dependencies
Blocks
Our first block plugin
Block configuration
Working with links
The URL
The link
Which way to link?
Event Dispatcher and redirects
Redirecting from a Controller
Redirecting from a subscriber
Dispatching events
Summary
Chapter 3: Logging and Mailing
Logging
The Drupal 8 logging theory
Our own logger channel
Our own logger
Logging for Hello World
Logging summary
Mail API
The theory of the Mail API
Implementing hook_mail()
Sending emails
Altering someone else\'s emails
Custom mail plugins
The mail plugin
Using mail plugins
Tokens
The Token API
Using tokens
Defining new tokens
Token summary
Summary
Chapter 4: Theming
Business logic versus presentation logic
Twig
Theme hooks
Theme hook suggestions
Render arrays
The structure of a render array
#type
#theme
#markup
The render pipeline
Assets and libraries
Libraries
Attaching libraries
Common theme hooks
Lists
Links
Tables
Attributes
Theming our Hello World module
Summary
Chapter 5: Menus and Menu Links
The menu system
Menus
Menu links
Multiple types of menu links
Local tasks
Local actions
Contextual links
MenuLink trees
Menu link tree manipulators
Menu active trail
Rendering menus
Working with menu links
Defining menu links
Working with menu links
Defining local tasks
Defining local actions
Defining contextual links
Summary
Chapter 6: Data Modeling and Storage
Different types of data storage
State API
Tempstore
PrivateTempStore
A note about anonymous users
SharedTempStore
Tempstore conclusion
UserData
Configuration
Introduction
What is configuration used for?
Managing configuration
Different types of configuration
Configuration storage
Schema
Overrides
Global overrides
Module overrides
Language overrides
Priority
Interacting with simple configuration
Entities
Content versus configuration entity types
Entity type plugins
Identifiers
Bundles
Database tables
Entity keys
Links
Entity translation
Entity revisions
Configuration export
Handlers
Fields
Configuration entity fields
Content entity fields
Base fields
Configurable fields
Field storage
Entity types summary
TypedData
Why?
What?
The low-level API
DataType plugins
Data definitions
Content entities
TypedData summary
Interacting with the Entity API
Querying and loading entities
Building queries
Loading entities
Reading entities
Manipulating entities
Creating entities
Rendering content entities
Pseudo-fields
Content entity validation
Validation summary
Summary
Chapter 7: Your Own Custom Entity and Plugin Types
Custom content entity type
Custom plugin type
Custom configuration entity type
The Importer plugin
Content entity bundles
Drush command
Summary
Chapter 8: The Database API
The Schema API
Running queries
Select queries
Handling the result
More complex select queries
Range queries
Pagers
Insert queries
Update queries
Delete queries
Transactions
Query alters
Update hooks
Summary
Chapter 9: Custom Fields
Field type
Field widget
Field formatter
Field settings
Using as a base field
Summary
Chapter 10: Access Control
Introduction to the Drupal access system
Roles and permissions under the hood
Defining permissions
Checking the user credentials
Route access
Custom route access
Static approach
Service approach
Programmatically checking access on routes
Bonus - dynamic route options for access control
CSRF protection on routes
Altering routes
Entity access
Injecting services into Entity handlers
Entity access hooks
Field access
Entity access in routes
Node access grants
Block access
Summary
Chapter 11: Caching
Introduction
Cacheability metadata
Cache tags
Cache contexts
Max-age
Using the cache metadata
Caching in block plugins
Caching access results
Placeholders and lazy building
Lazy builders
Using the Cache API
Creating our own cache bin
Summary
Chapter 12: JavaScript and the Ajax API
JavaScript in Drupal
Drupal behaviors
Our library
The JavaScript
Drupal settings
Ajax API
Ajax links
Ajax in forms
States (Form) system
Summary
Chapter 13: Internationalization and Languages
Introduction
Language
Content Translation
Configuration Translation
Interface Translation
Internationalization
Content entities and the Translation API
Summary
Chapter 14: Batches, Queues, and Cron
Batch powered update hooks
Batch operations
Creating the batch
Batch operations
Cron
Queues
Introduction to the Queue API
Cron based queue
Processing a queue programmatically
Lock API
Summary
Chapter 15: Views
Entities in Views
Exposing custom data to Views
Views data
Views fields
Views relationships
Views sorts and filters
Views arguments
Altering Views data
Custom Views field
Field configuration
Custom Views filter
Custom Views argument
Views theming
Views hooks
Summary
Chapter 16: Working with Files and Images
The filesystem
Stream wrappers
Managed versus unmanaged files
Using the File and Image fields
Working with managed files
Attaching managed files to entities
Helpful functions for dealing with managed files
Managed file uploads
Managed file form element
Entity CRUD hooks
Managed file usage service
Processing the CSV file
Our own stream wrapper
Working with unmanaged files
Private file system
Images
Image toolkits
Image styles
Rendering images
Summary
Chapter 17: Automated Testing
Testing methodologies in Drupal 8
PHPUnit
Registering tests
Unit tests
Mocked dependencies
Kernel tests
TeamCleaner test
CsvImporter test
Functional tests
Configuration for functional tests
Hello World page test
Hello World form test
Functional JavaScript tests
Time test
CsvImporter test
Summary
Appendix: Drupal 8 Security
Cross-Site Scripting (XSS)
Sanitization methods in Drupal 8
Double escaping
SQL Injection
Cross-Site Request Forgery (CSRF)
Summary
Index