protected function TripalFieldDownloader::setPrintableFields
3.x TripalFieldDownloader.inc | protected TripalFieldDownloader::setPrintableFields() |
Conslidates all the fields into a single list of accession numbers.
The array of printable fields will contain an array containing the accession number and the label. The title used is from the first occurance of an accession.
1 call to TripalFieldDownloader::setPrintableFields()
- TripalFieldDownloader::__construct in tripal/
includes/ TripalFieldDownloaders/ TripalFieldDownloader.inc - Constructs a new instance of the TripalFieldDownloader class.
File
- tripal/
includes/ TripalFieldDownloaders/ TripalFieldDownloader.inc, line 463
Class
Code
protected function setPrintableFields() {
foreach ($this->fields as $site => $bundles) {
foreach ($bundles as $bundle_name => $bundle_fields) {
foreach ($bundle_fields as $field_id => $info) {
$field = $info['field'];
$instance = $info['instance'];
$accession = $instance['settings']['term_vocabulary'] . ':' . $instance['settings']['term_accession'];
if (!array_key_exists($accession, $this->printable_fields)) {
// Only include fields that support this downloader type in
// or list of printable fields.
if ($this->isFieldSupported($field, $instance)) {
$this->printable_fields[$accession] = $instance['label'];
}
}
}
}
}
}