FieldImage.php in Lightgallery 8
File
src/Field/FieldImage.php
View source
<?php
namespace Drupal\lightgallery\Field;
use Drupal\lightgallery\Group\GroupLightgalleryCore;
class FieldImage 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 'image_field';
}
protected function setTitle() {
return 'Image field';
}
protected function setType() {
return FieldTypesEnum::SELECT;
}
protected function setDescription() {
return 'Select the field you want to use to display the images in the Lightgallery.';
}
protected function setGroup() {
return new GroupLightgalleryCore();
}
}