You are here

public function LockFieldsManager::getLockedFieldsByContentEntity in TMGMT Translator Smartling 8.4

Returns list of locked fields for a given entity.

Parameters

EntityInterface $entity:

array $default:

Return value

array

1 call to LockFieldsManager::getLockedFieldsByContentEntity()
LockFieldsManager::getLockedFieldsByContentEntityData in src/Smartling/LockFields/LockFieldsManager.php
Returns list of locked fields for an entity by its data.

File

src/Smartling/LockFields/LockFieldsManager.php, line 100

Class

LockFieldsManager
Class LockFieldsManager

Namespace

Drupal\tmgmt_smartling\Smartling\LockFields

Code

public function getLockedFieldsByContentEntity(EntityInterface $entity, array $default = []) {
  return array_filter($this->state
    ->get($this
    ->getLockedFieldsStateKeyByContentEntity($entity), $default));
}