public function FieldCollectionSlideshow::fieldSlideshowGetFields in Field Slideshow 8.2
Helper function.
1 call to FieldCollectionSlideshow::fieldSlideshowGetFields()
- FieldCollectionSlideshow::settingsForm in src/
Plugin/ Field/ FieldFormatter/ FieldCollectionSlideshow.php
File
- src/
Plugin/ Field/ FieldFormatter/ FieldCollectionSlideshow.php, line 621
Class
- FieldCollectionSlideshow
- Plugin implementation of the 'slideshow' formatter.
Namespace
Drupal\field_slideshow\Plugin\Field\FieldFormatterCode
public function fieldSlideshowGetFields($support_type, $bundle, $field_name) {
$link = array();
$map = \Drupal::entityManager()
->getFieldMap();
$map = $map['field_collection_item'];
$field_machinename = array();
foreach ($map as $key => $value) {
if ($value['type'] == $support_type) {
$field_machinename[$key] = $value['bundles'];
}
}
foreach ($field_machinename as $key => $values) {
foreach ($values as $innerkey => $innervalue) {
if ($innerkey == $field_name) {
$link[$key] = $key;
}
}
}
return $link;
}