舉報

會員
Drupal 8 Module Development
Daniel Sipos 著
更新時間:2021-07-02 12:23:34
開會員,本書免費讀 >
Drupal8comeswithareleasecyclethatallowsfornewfunctionalitytobeaddedatamuchfasterpace.However,thisalsomeanscodedeprecationsandchangingarchitecturethatyouneedtostayontopof.Thisbookupdatesthefirsteditionandincludesthenewfunctionalityintroducedinversionsupto,andincluding8.7.ThebookwillfirstintroduceyoutotheDrupal8architectureanditssubsystemsbeforedivingintocreatingyourfirstmodulewithbasicfunctionality.YouwillworkwiththeDrupalloggingandmailingsystems,learnhowtooutputdatausingthethemelayerandworkwithmenusandlinksprogrammatically.Then,youwilllearnhowtoworkwithdifferentkindsofdatastorages,createcustomentities,fieldtypesandleveragetheDatabaseAPIforlowerleveldatabasequeries.YouwillfurtherseehowtointroduceJavaScriptintoyourmodule,workwiththevariousfilesystemsandensurethecodeyouwriteworksonmultilingualsites.Finally,youwilllearnhowtoprogrammaticallyworkwithViews,writeautomatedtestsforyourfunctionalityandalsowritesecurecodeingeneral.Bytheend,youwillhavelearnedhowtodevelopyourowncustommodulethatcanprovidecomplexbusinesssolutions.Andwhoknows,maybeyou’llevencontributeitbacktotheDrupalcommunity.ForewordbyDriesBuytaert,founderofDrupal.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Summary
- Cross-Site Request Forgery (CSRF)
- SQL Injection
- Double escaping
品牌:中圖公司
上架時間:2021-07-02 11:58:59
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-07-02 12:23:34
- Other Books You May Enjoy
- Summary
- Cross-Site Request Forgery (CSRF)
- SQL Injection
- Double escaping
- Sanitization methods in Drupal 8
- Cross-Site Scripting (XSS)
- Drupal 8 Security
- Summary
- CsvImporter test
- Time test
- Functional JavaScript tests
- Hello World form test
- Hello World page test
- Configuration for functional tests
- Functional tests
- CsvImporter test
- TeamCleaner test
- Kernel tests
- Mocked dependencies
- Unit tests
- Registering tests
- PHPUnit
- Testing methodologies in Drupal 8
- Automated Testing
- Summary
- Rendering images
- Image styles
- Image toolkits
- Images
- Private filesystem
- Working with unmanaged files
- Our own stream wrapper
- Processing the CSV file
- Managed file usage service
- Entity CRUD hooks
- Managed file form element
- Managed file uploads
- Helpful functions for dealing with managed files
- Attaching managed files to entities
- Working with managed files
- Using the File and Image fields
- Managed versus unmanaged files
- Stream wrappers
- The filesystem
- Working with Files and Images
- Summary
- Views hooks
- Views theming
- Custom Views argument
- Custom Views filter
- Field configuration
- Custom Views field
- Altering Views data
- Views arguments
- Views sorts and filters
- Views relationships
- Views fields
- Views data
- Exposing custom data to Views
- Entities in Views
- Views
- Summary
- The Lock API
- Processing a queue programmatically
- Cron-based queues
- Introduction to the Queue API
- Queues
- Cron
- Batch operations
- Creating the batch
- Batch operations
- Batch-powered update hooks
- Batches Queues and Cron
- Summary
- Content entities and the Translation API
- Internationalization
- Interface translation
- Configuration translation
- Content translation
- Language
- Introduction to the multilingual ecosystem
- Internationalization and Languages
- Summary
- States (Form) system
- Ajax in forms
- Ajax links
- The Ajax API
- Drupal settings
- The JavaScript
- Our library
- Drupal behaviors
- JavaScript in Drupal
- JavaScript and the Ajax API
- Summary
- Creating our own cache bin
- Using the Cache API
- Lazy builders
- Placeholders and lazy building
- Caching access results
- Caching in block plugins
- Using the cache metadata
- Max-age
- Cache contexts
- Cache tags
- Cacheability metadata
- Introduction to Caching
- Caching
- Summary
- Block access
- Node access grants
- Entity access in routes
- Field access
- Entity access hooks
- Injecting services into Entity handlers
- Entity access
- Altering routes
- CSRF protection on routes
- Bonus—dynamic route options for access control
- Programmatically checking access on routes
- Service approach
- Static approach
- Custom route access
- Route access
- Checking the user credentials
- Defining permissions
- Roles and permissions under the hood
- Introduction to the Drupal access system
- Access Control
- Summary
- Using our custom field type as a base field
- Field settings
- Field formatter
- Field widget
- Field type
- A recap of Field type plugins
- Custom Fields
- Summary
- Update hooks
- Query alters
- Transactions
- Delete queries
- Update queries
- Insert queries
- Pagers
- Range queries
- More complex select queries
- Handling the result
- Select queries
- Running queries
- The Schema API
- The Database API
- Summary
- Drush command
- Content entity bundles
- The Importer plugin
- Custom configuration entity type
- Custom plugin type
- Custom content entity type
- Your Own Custom Entity and Plugin Types
- Summary
- Validation summary
- Configuration entities
- Content entities
- Entity validation
- Pseudo-fields
- Rendering content entities
- Creating entities
- Manipulating entities
- Reading entities
- Loading entities
- Building queries
- Querying entities
- Interacting with the Entity API
- TypedData summary
- Content entities
- Data definitions
- DataType plugins
- The low-level API
- What is TypedData?
- Why TypedData?
- TypedData
- Entity types summary
- Field storage
- Configurable fields
- Base fields
- Content entity fields
- Configuration entity fields
- Fields
- Handlers
- Configuration export
- Entity revisions
- Entity translation
- Links
- Entity keys
- Database tables
- Bundles
- Identifiers
- Entity type plugins
- Content versus configuration entity types
- Entities
- Interacting with simple configuration
- Priority
- Language overrides
- Module overrides
- Global overrides
- Overrides
- Schema
- Configuration storage
- Different types of configuration
- Managing configuration
- What is configuration used for?
- Introduction
- Configuration
- UserData
- Tempstore conclusion
- Shared TempStore
- Private TempStore
- TempStore
- State API
- Different types of data storage
- Data Modeling and Storage
- Summary
- Defining contextual links
- Defining local actions
- Defining local tasks
- Working with menu links
- Defining menu links
- Working with menu links
- Rendering menus
- Menu active trail
- Menu link tree manipulators
- MenuLink trees
- Contextual links
- Local actions
- Local tasks
- Multiple types of menu links
- Menu links
- Menus
- The menu system
- Menus and Menu Links
- Summary
- Theming our Hello World module
- Rendering a layout
- Defining layouts
- Layouts
- Attributes
- Tables
- Links
- Lists
- Common theme hooks
- Attaching libraries
- Libraries
- Assets and libraries
- The render pipeline
- #markup
- #theme
- #type
- The structure of a render array
- Render arrays
- Theme hook suggestions
- Theme hooks
- Twig
- Business logic versus presentation logic
- Theming
- Summary
- Token summary
- Defining new tokens
- Using tokens
- The Token API
- Tokens
- Using mail plugins
- The mail plugin
- Custom mail plugins
- Altering someone else's emails
- Sending emails
- Implementing hook_mail()
- The theory of the Mail API
- Mail API
- Logging summary
- Logging for Hello World
- Our own logger
- Our own logger channel
- The Drupal 8 logging theory
- Logging
- Logging and Mailing
- Summary
- Dispatching events
- Redirecting from a subscriber
- Redirecting from a Controller
- Event Dispatcher and redirects
- Which way to link?
- The link
- The URL
- Working with links
- Block configuration
- Our first block plugin
- Blocks
- Service dependencies
- Rendering forms
- Custom submit handlers
- Altering forms
- The form
- Invoked Controllers
- Injecting the service into our Controller
- Using services in Drupal 8
- Tagged services
- The HelloWorldSalutation service
- What is a service?
- Services
- The Controller
- Namespaces
- Route variables
- The route
- Route and controller
- Your first hook implementation
- Creating a module
- Creating Your First Module
- Summary
- Developer settings
- Drupal Console
- Drush (the Drupal shell)
- The developer (Devel) module
- The API site and coding standards
- Composer
- Version control
- Tools for developing in Drupal
- Other subsystems
- Caching
- The theme system
- Plugins
- Configuration
- Forms
- Views
- Menus
- Fields
- Entities
- Routing
- Drupal's major subsystems
- From request to response
- Services and the dependency injection container
- Hooks plugins and events
- Drupal core modules and themes
- Drupal architecture
- HTML CSS and JavaScript
- The web server
- Databases and MySQL
- PHP
- Technologies that drive Drupal
- Developing for Drupal 8
- Introducing Drupal (for developers)
- Developing for Drupal 8
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the author
- Contributors
- Foreword
- Packt.com
- Why subscribe?
- About Packt
- Drupal 8 Module Development Second Edition
- Copyright and Credits
- Title Page
- coverpage
- coverpage
- Title Page
- Copyright and Credits
- Drupal 8 Module Development Second Edition
- About Packt
- Why subscribe?
- Packt.com
- Foreword
- Contributors
- About the author
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- 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
- 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
- Invoked Controllers
- 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
- 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
- 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
- Layouts
- Defining layouts
- Rendering a layout
- Theming our Hello World module
- Summary
- 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
- Data Modeling and Storage
- Different types of data storage
- State API
- TempStore
- Private TempStore
- Shared TempStore
- 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 TypedData?
- What is TypedData?
- The low-level API
- DataType plugins
- Data definitions
- Content entities
- TypedData summary
- Interacting with the Entity API
- Querying entities
- Building queries
- Loading entities
- Reading entities
- Manipulating entities
- Creating entities
- Rendering content entities
- Pseudo-fields
- Entity validation
- Content entities
- Configuration entities
- Validation summary
- Summary
- 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
- 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
- Custom Fields
- A recap of Field type plugins
- Field type
- Field widget
- Field formatter
- Field settings
- Using our custom field type as a base field
- Summary
- 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
- Caching
- Introduction to Caching
- 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
- JavaScript and the Ajax API
- JavaScript in Drupal
- Drupal behaviors
- Our library
- The JavaScript
- Drupal settings
- The Ajax API
- Ajax links
- Ajax in forms
- States (Form) system
- Summary
- Internationalization and Languages
- Introduction to the multilingual ecosystem
- Language
- Content translation
- Configuration translation
- Interface translation
- Internationalization
- Content entities and the Translation API
- Summary
- Batches Queues and Cron
- Batch-powered update hooks
- Batch operations
- Creating the batch
- Batch operations
- Cron
- Queues
- Introduction to the Queue API
- Cron-based queues
- Processing a queue programmatically
- The Lock API
- Summary
- 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
- 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 filesystem
- Images
- Image toolkits
- Image styles
- Rendering images
- Summary
- 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
- Drupal 8 Security
- Cross-Site Scripting (XSS)
- Sanitization methods in Drupal 8
- Double escaping
- SQL Injection
- Cross-Site Request Forgery (CSRF)
- Summary
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-07-02 12:23:34