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

Breadcrumb

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

function FieldableEntityInterface::onChange

Reacts to changes to a field.

Note that this is invoked after any changes have been applied.

Parameters

string $field_name: The name of the field which is changed.

Throws

\InvalidArgumentException When trying to assign a value to the language field that matches an existing translation.

\LogicException When trying to change:

  • The language of a translation.
  • The value of the flag identifying the default translation object.

File

core/lib/Drupal/Core/Entity/FieldableEntityInterface.php, line 210

Class

FieldableEntityInterface
Interface for entities having fields.

Namespace

Drupal\Core\Entity

Code

public function onChange($field_name);

API Navigation

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