【发布时间】:2012-03-20 08:03:34
【问题描述】:
我有一个字段集合,其中包含
- 复制字段
- 一个用户字段,通过实体引用
现在,当我尝试通过将集合存储在$collection 中来访问复制字段时,通过
$collection->field_my_collection_copy->value();
我得到了我正在寻找的东西,但在实体引用字段上尝试类似
$collection->field_my_collection_user->value();
它坏了。通过查看$collection->field_my_collection_user 的变量,我应该有'uid' 可用,但$collection->field_my_collection_user->uid 什么也没给我,$collection->field_my_collection_user->uid->value(); 给我Unable to get the data property uid as the parent data structure is not set
【问题讨论】:
标签: drupal-7 entity field entityreference