private function DibaCarousel::getFieldsByType in Diba carousel slider 8
Get fields filtered by type.
1 call to DibaCarousel::getFieldsByType()
- DibaCarousel::blockForm in src/
Plugin/ Block/ DibaCarousel.php
File
- src/
Plugin/ Block/ DibaCarousel.php, line 638
Class
- DibaCarousel
- Provides a Diba carousel Block.
Namespace
Drupal\diba_carousel\Plugin\BlockCode
private function getFieldsByType($types, $entity = 'node') {
$fields = $this
->getFields($entity);
$options = [];
foreach ($types as $type) {
if (isset($fields[$type])) {
$options = array_merge($options, $fields[$type]);
}
}
return $options;
}