You are here

FieldGalleryId.php in Lightgallery 8

File

src/Field/FieldGalleryId.php
View source
<?php

namespace Drupal\lightgallery\Field;

use Drupal\lightgallery\Group\GroupLightgalleryHash;

/**
 * Field gallery id.
 */
class FieldGalleryId extends FieldBase {

  /**
   * {@inheritdoc}
   */
  protected function setDefaultValue() {
    return 1;
  }

  /**
   * {@inheritdoc}
   */
  protected function setName() {
    return 'gallery_id';
  }

  /**
   * {@inheritdoc}
   */
  protected function setTitle() {
    return 'Gallery ID';
  }

  /**
   * {@inheritdoc}
   */
  protected function setType() {
    return FieldTypesEnum::TEXTFIELD;
  }

  /**
   * {@inheritdoc}
   */
  protected function setDescription() {
    return 'Unique id for each gallery. It is mandatory when you use hash plugin for multiple galleries on the same page.';
  }

  /**
   * {@inheritdoc}
   */
  protected function setGroup() {
    return new GroupLightgalleryHash();
  }

}

Classes

Namesort descending Description
FieldGalleryId Field gallery id.