FieldThumbnail.php in Lightgallery 8
File
src/Field/FieldThumbnail.php
View source
<?php
namespace Drupal\lightgallery\Field;
use Drupal\lightgallery\Group\GroupLightgalleryCore;
class FieldThumbnail extends FieldBase {
public function appliesToFieldFormatter() {
return FALSE;
}
protected function setIsRequired() {
return TRUE;
}
protected function setDefaultValue() {
return NULL;
}
protected function setOptions() {
return [
'Drupal\\lightgallery\\Plugin\\views\\style\\LightGallery',
'getImageFields',
];
}
protected function setName() {
return 'thumb_field';
}
protected function setTitle() {
return 'Thumbnail field';
}
protected function setType() {
return FieldTypesEnum::SELECT;
}
protected function setDescription() {
return 'Select the field you want to use to display the thumbnails on page load.';
}
protected function setGroup() {
return new GroupLightgalleryCore();
}
}