You are here

public function ThemePluginBase::build in Display Suite 8.2

Same name and namespace in other branches
  1. 8.4 src/Plugin/DsField/ThemePluginBase.php \Drupal\ds\Plugin\DsField\ThemePluginBase::build()
  2. 8.3 src/Plugin/DsField/ThemePluginBase.php \Drupal\ds\Plugin\DsField\ThemePluginBase::build()

Renders a field.

Overrides DsFieldBase::build

File

src/Plugin/DsField/ThemePluginBase.php, line 13

Class

ThemePluginBase
The base plugin to create DS theme fields.

Namespace

Drupal\ds\Plugin\DsField

Code

public function build() {
  $field = $this
    ->getConfiguration();
  $format = $this
    ->formatter();
  return array(
    '#markup' => _theme($format, $field),
  );
}