ThemePluginBase.php in Display Suite 8.3
Same filename and directory in other branches
Namespace
Drupal\ds\Plugin\DsFieldFile
src/Plugin/DsField/ThemePluginBase.phpView source
<?php
namespace Drupal\ds\Plugin\DsField;
/**
* The base plugin to create DS theme fields.
*/
abstract class ThemePluginBase extends DsFieldBase {
/**
* {@inheritdoc}
*/
public function build() {
$field = $this
->getConfiguration();
$format = $this
->formatter();
return [
'#markup' => _theme($format, $field),
];
}
/**
* Returns the formatter for the theming function.
*/
protected function formatter() {
return '';
}
}
Classes
Name | Description |
---|---|
ThemePluginBase | The base plugin to create DS theme fields. |