Révision 950416da
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/field_collection/ctools/relationships/field_collection_from_field.inc | ||
---|---|---|
43 | 43 |
$child_plugin['title'] = t( |
44 | 44 |
'!label field collection (!field_name) from !entity_type (!bundle)', |
45 | 45 |
array( |
46 |
'!label' => $instance['label'], |
|
47 |
'!field_name' => $instance['field_name'], |
|
48 |
'!entity_type' => $instance['entity_type'], |
|
49 |
'!bundle' => $instance['bundle']
|
|
46 |
'!label' => $instance['label'],
|
|
47 |
'!field_name' => $instance['field_name'],
|
|
48 |
'!entity_type' => $instance['entity_type'],
|
|
49 |
'!bundle' => $instance['bundle'],
|
|
50 | 50 |
) |
51 | 51 |
); |
52 | 52 |
$restrictions = array('type' => array($instance['bundle'])); |
... | ... | |
78 | 78 |
if (isset($entity->{$plugin_info['field_name']})) { |
79 | 79 |
|
80 | 80 |
$items = field_get_items($plugin_info['entity_type'], $entity, $plugin_info['field_name']); |
81 |
if (isset($items[$delta]['value'])) { |
|
81 |
if (!empty($items) && isset($items[$delta]['value'])) {
|
|
82 | 82 |
$field_collection_item = field_collection_item_load($items[$delta]['value']); |
83 | 83 |
} |
84 | 84 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules