Services, dependency injection, and service containers 发表于 2017-07-20 创建Services .info.yml .services.yml 123services: service_example.example_service: class: Drupal\s ... 阅读全文 »
Entity queries , loading entities , editing fields 发表于 2017-07-20 entity query Class based method (recommended) 1234567891011121314151617181920212223// This function ... 阅读全文 »
Entities, Content Entities, and Configuration Entities 发表于 2017-07-20 概念 Entity types:An entity type is a useful abstraction to group together fields. Bundles:Bundles are ... 阅读全文 »
Configuration forms and management 发表于 2017-07-20 概念 Configuration management提供一个集中的地方来存储configuration数据,可以在多个环境建导入导出配置信息。 Config Object是configuration ... 阅读全文 »
Blocks, Configuration, and Forms 发表于 2017-07-20 drupal 8 中block系统由plugin API和entity API组成。也就是说即有可重用特性,又有fieldable特性。 Block最小化实现 .info.yml src/Plugin ... 阅读全文 »
send mail 发表于 2017-07-13 drupal8发送mail方法 注册SMTP server 12345'host' => 'smtp.126.com','port' ... 阅读全文 »
create custom module 发表于 2017-07-11 理解Examples module, Symfony, Controllers, and the MenuBlocks, Configuration, and FormsConfiguration f ... 阅读全文 »
create custom twig(Render Array) 发表于 2017-07-07 概念 Elements在drupal中,页面的各个部分被组织微elements。这些elements通常包括其他elements。比如:links, buttons, fields, images, ... 阅读全文 »
Twig_Xdebug Module 发表于 2017-07-06 xdebug查看Twig中所有变量。 安装安装Twig_Xdebug方法 使用方法 把下边代码放到twig文件中 1{{breakpoint()}} 启动xd ... 阅读全文 »
修改模板 发表于 2017-07-06 覆盖模板方法及修改主题建议方法 覆盖模板方法举例说明:在block上放置一个title=“menu title link”的menu。drupal core contrib theme生成的hook ... 阅读全文 »