Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EntityDisplayInterface.php

function EntityDisplayInterface::getRenderer

Gets the renderer plugin for a field (e.g. widget, formatter).

Parameters

string $field_name: The field name.

Return value

\Drupal\Core\Field\PluginSettingsInterface|null A widget or formatter plugin or NULL if the field does not exist.

1 call to EntityDisplayInterface::getRenderer()
EntityDisplayBase::onDependencyRemoval in core/lib/Drupal/Core/Entity/EntityDisplayBase.php
Informs the entity that entities it depends on will be deleted.
2 methods override EntityDisplayInterface::getRenderer()
EntityFormDisplay::getRenderer in core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php
Gets the renderer plugin for a field (e.g. widget, formatter).
EntityViewDisplay::getRenderer in core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php
Gets the renderer plugin for a field (e.g. widget, formatter).

File

core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php, line 87

Class

EntityDisplayInterface
Provides a common interface for entity displays.

Namespace

Drupal\Core\Entity\Display

Code

public function getRenderer($field_name);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal