八月 2017

17 08月
Drupal 8 模块开发 8.1 : 服务
作者:蒲公英
0条评论
Drupal8模块开发
原文地址:https://docs.acquia.com/articles/drupal-8-services-dependency-injection-and-service-containers    
17 08月
Drupal 8 模块开发 7.2 : 加载字段的例子
作者:蒲公英
0条评论
Drupal8模块开发
原文地址:https://docs.acquia.com/articles/drupal-8-loading-fields-examples     例子模块 我们将创建一个例子模块,加载一个节点(node),输出它的一些信息。首先,至少创建一个节点,body 字段填写一些内容。然后,我们创建这个模块,加载单一节点。   创建文件 field_example.info.yml : name: Field Example type: module description: Example showing how to use fields core: 8.x package: Examples 创建文件 field_example.routing.yml :
17 08月
Drupal 8 模块开发 7.1 : 加载和编辑字段
作者:蒲公英
0条评论
Drupal8模块开发
原文地址:https://docs.acquia.com/articles/drupal-8-loading-and-editing-fields   Drupal 7 中的字段经常被存储为能够接纳多种模式的复杂数组。 Drupal 8 中字段全部使用相同模式。不管字段是单值、多值、多语言、内置字段或者是附加字段,他们全部是类 FieldItemList 的对象。 在某些方面,这使得开发 Drupal 8 容易,但也意味着原本在 Drupal 7 内比较简单的东西可能变得更复杂。  
17 08月
Drupal 8 模块开发 6.3 : 实验室和其他信息
作者:蒲公英
0条评论
Drupal8模块开发
原文地址:https://docs.acquia.com/articles/drupal-8-load-and-query-entities-lab     总结 本课我们看到了在 Drupal 8 中如何查询和加载实体。Drupal 8 把 7 中的 EntityFieldQuery 类进行了大修,提供了查询内容实体和配置实体的健壮 API。我们只看了查询内容实体,但查询配置实体用法是相同的。   我们也看到了怎样通过查询实体得到的 ID 加载实体的方法。接下来我们会看下 Drupal 8 中如何定义内容实体类型,要复习下这个在 Drupal 7 是怎么做的,请查看 Sitepoint articles。  
17 08月
Drupal 8 模块开发 6.2 : 加载实体
作者:蒲公英
0条评论
Drupal8模块开发
原文地址:https://docs.acquia.com/article/lesson-62-loading-entities