Revision 0c2b9b9d
Added by Andreas Kohlbecker over 7 years ago
modules/cdm_dataportal/cdm_api/cdm_api.module | ||
---|---|---|
1667 | 1667 |
} |
1668 | 1668 |
} |
1669 | 1669 |
|
1670 |
/** |
|
1671 |
* Extends the $cdm_entity object by the field if it is not already existing. |
|
1672 |
* |
|
1673 |
* This function can only be used for fields with 1 to many relations. |
|
1674 |
* |
|
1675 |
* @param $cdm_base_type |
|
1676 |
* @param $field_name |
|
1677 |
* @param $cdm_entity |
|
1678 |
*/ |
|
1679 |
function cdm_lazyload_array_field($cdm_base_type, $field_name, &$cdm_entity) |
|
1680 |
{ |
|
1681 |
if (!isset($cdm_entity->$field_name)) { |
|
1682 |
$items = cdm_ws_fetch_all('portal/' . $cdm_base_type . '/' . $cdm_entity->uuid . '/' . $field_name); |
|
1683 |
$cdm_entity->$field_name = $items; |
|
1684 |
} |
|
1685 |
} |
|
1686 |
|
|
1687 |
|
|
1670 | 1688 |
/** |
1671 | 1689 |
* Get a NomenclaturalReference string. |
1672 | 1690 |
* |
Also available in: Unified diff
fix #6301 implementing display of sources and annotations for media