abstract class FieldBase in Lightgallery 8
Field base.
Hierarchy
- class \Drupal\lightgallery\Field\FieldBase implements FieldInterface
Expanded class hierarchy of FieldBase
File
- src/
Field/ FieldBase.php, line 8
Namespace
Drupal\lightgallery\FieldView source
abstract class FieldBase implements FieldInterface {
protected $name;
protected $title;
protected $type;
protected $description;
protected $isRequired;
protected $group;
protected $defaultValue;
protected $options;
/**
* {@inheritdoc}
*/
public function __construct() {
$this->name = $this
->setName();
$this->title = $this
->setTitle();
$this->type = $this
->setType();
$this->description = $this
->setDescription();
$this->isRequired = $this
->setIsRequired();
$this->group = $this
->setGroup();
$this->defaultValue = $this
->setDefaultValue();
$this->options = $this
->setOptions();
}
/**
* {@inheritdoc}
*/
public function getName() {
return $this->name;
}
/**
* {@inheritdoc}
*/
public function getTitle() {
return $this->title;
}
/**
* {@inheritdoc}
*/
public function getType() {
return $this->type;
}
/**
* {@inheritdoc}
*/
public function getDescription() {
return $this->description;
}
/**
* {@inheritdoc}
*/
public function isRequired() {
return $this->isRequired;
}
/**
* {@inheritdoc}
*/
public function getGroup() {
return $this->group;
}
/**
* {@inheritdoc}
*/
public function getDefaultValue() {
return $this->defaultValue;
}
/**
* {@inheritdoc}
*/
public function appliesToViews() {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function getOptions() {
return $this->options;
}
/**
* {@inheritdoc}
*/
public function appliesToFieldFormatter() {
return TRUE;
}
/**
* Sets required flag.
*/
protected function setIsRequired() {
return FALSE;
}
/**
* Sets default value.
*/
protected function setDefaultValue() {
return TRUE;
}
/**
* Sets options.
*/
protected function setOptions() {
return FALSE;
}
/**
* Sets name.
*/
protected abstract function setName();
/**
* Sets title.
*/
protected abstract function setTitle();
/**
* Sets type.
*/
protected abstract function setType();
/**
* Sets description.
*/
protected abstract function setDescription();
/**
* Sets group.
*/
protected abstract function setGroup();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FieldBase:: |
protected | property | ||
FieldBase:: |
protected | property | ||
FieldBase:: |
protected | property | ||
FieldBase:: |
protected | property | ||
FieldBase:: |
protected | property | ||
FieldBase:: |
protected | property | ||
FieldBase:: |
protected | property | ||
FieldBase:: |
protected | property | ||
FieldBase:: |
public | function |
Returns where the field has to be rendered in field formatter settings. Overrides FieldInterface:: |
3 |
FieldBase:: |
public | function |
Returns where the field has to be rendered in view settings. Overrides FieldInterface:: |
3 |
FieldBase:: |
public | function |
Returns field default value. Overrides FieldInterface:: |
|
FieldBase:: |
public | function |
Returns field description. Overrides FieldInterface:: |
|
FieldBase:: |
public | function |
Returns field group (parent). Overrides FieldInterface:: |
|
FieldBase:: |
public | function |
Returns field name. Overrides FieldInterface:: |
|
FieldBase:: |
public | function |
Returns field options callback. Overrides FieldInterface:: |
|
FieldBase:: |
public | function |
Returns field title. Overrides FieldInterface:: |
|
FieldBase:: |
public | function |
Returns field type. Overrides FieldInterface:: |
|
FieldBase:: |
public | function |
Returns if field is required. Overrides FieldInterface:: |
|
FieldBase:: |
protected | function | Sets default value. | 14 |
FieldBase:: |
abstract protected | function | Sets description. | 33 |
FieldBase:: |
abstract protected | function | Sets group. | 33 |
FieldBase:: |
protected | function | Sets required flag. | 2 |
FieldBase:: |
abstract protected | function | Sets name. | 33 |
FieldBase:: |
protected | function | Sets options. | 10 |
FieldBase:: |
abstract protected | function | Sets title. | 33 |
FieldBase:: |
abstract protected | function | Sets type. | 33 |
FieldBase:: |
public | function |