You are here

public function EntityChangedFieldsTrait::isFieldChanged in Brightcove Video Connect 3.x

Same name and namespace in other branches
  1. 8.2 src/EntityChangedFieldsTrait.php \Drupal\brightcove\EntityChangedFieldsTrait::isFieldChanged()
  2. 8 src/EntityChangedFieldsTrait.php \Drupal\brightcove\EntityChangedFieldsTrait::isFieldChanged()

Returns whether the field is changed or not.

Parameters

string $name: The name of the field on the entity.

Return value

bool The changed status of the field, TRUE if changed, FALSE otherwise.

2 calls to EntityChangedFieldsTrait::isFieldChanged()
BrightcovePlaylist::save in src/Entity/BrightcovePlaylist.php
BrightcoveVideo::save in src/Entity/BrightcoveVideo.php

File

src/EntityChangedFieldsTrait.php, line 35

Class

EntityChangedFieldsTrait
Provides a trait to identify changed entity fields.

Namespace

Drupal\brightcove

Code

public function isFieldChanged($name) {

  // Indicate that there is at least one changed field.
  if (!$this->changedFields) {
    $this->changedFields = TRUE;
  }
  return !empty($this->changedFields[$name]);
}