FieldTitle.php in Lightgallery 8
File
src/Field/FieldTitle.php
View source
<?php
namespace Drupal\lightgallery\Field;
use Drupal\lightgallery\Group\GroupLightgalleryCore;
class FieldTitle extends FieldBase {
public function appliesToFieldFormatter() {
return FALSE;
}
protected function setDefaultValue() {
return NULL;
}
protected function setOptions() {
return [
'Drupal\\lightgallery\\Plugin\\views\\style\\LightGallery',
'getNonImageFields',
];
}
protected function setName() {
return 'title';
}
protected function setTitle() {
return 'Title field';
}
protected function setType() {
return FieldTypesEnum::SELECT;
}
protected function setDescription() {
return 'Select the field you want to use as title in the Lightgallery. Leave empty to omit titles.';
}
protected function setGroup() {
return new GroupLightgalleryCore();
}
}