class DummyAjaxFormatter
Same name and namespace in other branches
- 11.x core/modules/image/tests/modules/image_module_test/src/Plugin/Field/FieldFormatter/DummyAjaxFormatter.php \Drupal\image_module_test\Plugin\Field\FieldFormatter\DummyAjaxFormatter
Empty renderer for a dummy field with an AJAX handler.
Plugin annotation
@FieldFormatter(
id = "image_module_test_dummy_ajax_formatter",
module = "image_module_test",
label = @Translation("Dummy AJAX"),
field_types= {
"image_module_test_dummy_ajax"
}
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\Core\Field\PluginSettingsBase extends \Drupal\Core\Field\PluginSettingsInterface, \Drupal\Component\Plugin\DependentPluginInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Field\FormatterBase extends \Drupal\Core\Field\FormatterInterface, \Drupal\Core\Plugin\ContainerFactoryPluginInterface implements \Drupal\Core\Field\PluginSettingsBase
- class \Drupal\image_module_test\Plugin\Field\FieldFormatter\DummyAjaxFormatter implements \Drupal\Core\Field\FormatterBase
- class \Drupal\Core\Field\FormatterBase extends \Drupal\Core\Field\FormatterInterface, \Drupal\Core\Plugin\ContainerFactoryPluginInterface implements \Drupal\Core\Field\PluginSettingsBase
- class \Drupal\Core\Field\PluginSettingsBase extends \Drupal\Core\Field\PluginSettingsInterface, \Drupal\Component\Plugin\DependentPluginInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
Expanded class hierarchy of DummyAjaxFormatter
File
-
core/
modules/ image/ tests/ modules/ image_module_test/ src/ Plugin/ Field/ FieldFormatter/ DummyAjaxFormatter.php, line 20
Namespace
Drupal\image_module_test\Plugin\Field\FieldFormatterView source
class DummyAjaxFormatter extends FormatterBase {
/**
* {@inheritdoc}
*/
public function settingsSummary() {
$summary = [];
$summary[] = $this->t('Renders nothing');
return $summary;
}
/**
* {@inheritdoc}
*/
public function viewElements(FieldItemListInterface $items, $langcode) {
$element = [];
return $element;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.