private function TripalFieldDownloader::setLocalFields
3.x TripalFieldDownloader.inc | private TripalFieldDownloader::setLocalFields() |
A helper function for the setFields() function.
Adds local fields to the list of fields.
1 call to TripalFieldDownloader::setLocalFields()
- TripalFieldDownloader::setFields in tripal/
includes/ TripalFieldDownloaders/ TripalFieldDownloader.inc - Sets the fields array
File
- tripal/
includes/ TripalFieldDownloaders/ TripalFieldDownloader.inc, line 381
Class
Code
private function setLocalFields() {
foreach ($this->collection_bundles as $collection_bundle) {
$bundle_name = $collection_bundle->bundle_name;
if ($collection_bundle->site_id) {
continue;
}
foreach ($collection_bundle->fields as $field_id) {
$field = field_info_field_by_id($field_id);
$instance = field_info_instance('TripalEntity', $field['field_name'], $bundle_name);
$this->fields['local'][$bundle_name][$field_id]['field'] = $field;
$this->fields['local'][$bundle_name][$field_id]['instance'] = $instance;
}
}
}