public function BlazyAdminFormatterBase::getExcludedFieldOptions in Blazy 8.2
Same name and namespace in other branches
- 8 src/Form/BlazyAdminFormatterBase.php \Drupal\blazy\Form\BlazyAdminFormatterBase::getExcludedFieldOptions()
- 7 src/Form/BlazyAdminFormatterBase.php \Drupal\blazy\Form\BlazyAdminFormatterBase::getExcludedFieldOptions()
Declutters options from less relevant options, specific to captions.
1 call to BlazyAdminFormatterBase::getExcludedFieldOptions()
- BlazyAdminFormatterBase::getFieldOptions in src/
Form/ BlazyAdminFormatterBase.php - Returns available fields for select options.
File
- src/
Form/ BlazyAdminFormatterBase.php, line 240
Class
- BlazyAdminFormatterBase
- A base for field formatter admin to have re-usable methods in one place.
Namespace
Drupal\blazy\FormCode
public function getExcludedFieldOptions() {
// @todo figure out a more efficient way than blacklisting.
// Do not exclude field_media_image as needed for Main stage.
$fields = 'document_size media_file id media_in_library mime_type source tweet_author tweet_id tweet_url media_video_embed_field instagram_shortcode instagram_url media_soundcloud media_oembed_video media_audio_file media_video_file media_facebook media_flickr file_url external_thumbnail local_thumbnail local_thumbnail_uri media_unsplash';
$fields = explode(' ', $fields);
$excludes = [];
foreach ($fields as $exclude) {
$excludes['field_' . $exclude] = 'field_' . $exclude;
}
$this->blazyManager
->getModuleHandler()
->alter('blazy_excluded_field_options', $excludes);
return $excludes;
}