FieldGalleryId.php in Lightgallery 8
File
src/Field/FieldGalleryId.php
View source
<?php
namespace Drupal\lightgallery\Field;
use Drupal\lightgallery\Group\GroupLightgalleryHash;
class FieldGalleryId extends FieldBase {
protected function setDefaultValue() {
return 1;
}
protected function setName() {
return 'gallery_id';
}
protected function setTitle() {
return 'Gallery ID';
}
protected function setType() {
return FieldTypesEnum::TEXTFIELD;
}
protected function setDescription() {
return 'Unique id for each gallery. It is mandatory when you use hash plugin for multiple galleries on the same page.';
}
protected function setGroup() {
return new GroupLightgalleryHash();
}
}