跳转到主要内容
rat 提交于 24 September 2014

原文地址: https://www.drupal.org/node/2143497

原文版本: November 25, 2013. 

(原文未成)

 

 

* Final name not yet defined, see #1976158: Rename entity storage/list/form/render "controllers" to handlers

While entities represent a piece of data, controllers are responsible for acting on and with them. The basic concept was introduced in Drupal 7, where the controller provided the API to load entities. That class was then extended in the entity.module to provide full CRUD support and other types of controllers were created.

rat 提交于 24 September 2014

原文地址: https://www.drupal.org/node/2143501

原文版本: May 9, 2014.

Configuration entities using the new entity API in Drupal 8 in order to keep configuration into the DB. The difference between the config entities to content entites:

  1. Configurable entity can be exported using the new CMI system.
  2. Configurable entity don't have field due to the way they stored in the DB
  3. Configurable entity defined a schema file unlike content entities which defined by hook_schema()
yplam 提交于 24 September 2014

原文链接:https://www.drupal.org/node/2203931

依赖于Drupal服务或者自定义服务的表单应该通过依赖注入来访问该服务。

如一个表单(与Form API in Drupal 8 中的类似)使用'current_user'服务来获取当前用户的uid。假设模块名的modules/example,那么文件 /modules/example/lib/Drupal/example/Form/ExampleForm.php 内容:

yplam 提交于 24 September 2014

原文地址:https://www.drupal.org/node/2026959

服务容器具有多个优点,因为每个服务都可以通过一个字符串键来访问/实例化,并且拥有一个已定义的接口,它可以用其他实现来替换。如果需要修改一个已有的服务,只需要实现一个ServiceProviderBase的子类并且编写alter()方法。

如:在my_module中定义my_module/src/MyModuleServiceProvider.php

长风 提交于 23 September 2014

2014年9月20日,成都Drupal聚会如期在成都理工大学9B102举行。此次参与Drupal交流的一共有6个人。现场气氛活跃但不混乱,正好适合Drupal开发技术交流学习。

首先,Drupal猎人详细讲述了Drupal services开发实战,并以一个工作中实际的应用,开发了APP版本更新的一个接口,并使用POSTER进行了测试,实现了预期Drupal开发Service 接口的效果,老李等从性能等方便提出了咨询,这些将根据项目使用到实际生产环境后的效果,再和Drupalers 分享。

Matt分享了很多使用Drupal开发的很酷的效果,比如使用Drupal开发的学生报名注册中图片采集效果让在场的每一个Drupaler纷纷称赞,Matt对实现的方式进行讲解。本人亦收获颇丰。

长风讲解了Form API的基础以及Drupal开发两个的案例:一个是酒店预订中,Drupal表单实现自动完成并进行自动填充的效果,另外一个是一个ajax的验证,长风展示了所有源代码。本意是希望通过展示简单的代码,实现相对其他框架或技术不易实现的功能,表现出Drupal简单、易用、功能强大的冰山一角,吸引更多人对Drupal产生兴趣。

板块
标签
tvdrupal 提交于 23 September 2014

wei_ming_ming_-2.jpg

最近阿里巴巴在美国上市,引起众多的热议。

马云在接受采访时,多次提到中小企业。 可见中小企业的巨大市场潜力。

那么对于drupal来说,在中小企业的表现如何呢? 从现在的数据来看,远远低于wordpress

这是为什么呢?

drupal给大家的第一印象就是高大上,无所不能。 主要做一些大项目,大网站,比如政府网站,教育和图书馆的网站。

那么中小企业网站,这么大的市场,不什么不重视呢? 个人觉得还是门槛的原因。 drupal入门比较难,学习曲线比较陡。还有drupal的用户体验较低,现在的drupal7版本,连个编辑器功能也没有。

订阅