You are here

protected function LockFieldsManager::getLockedFieldsStateKeyByContentEntity in TMGMT Translator Smartling 8.4

Generates State key for a given entity.

Parameters

EntityInterface $entity:

Return value

string

2 calls to LockFieldsManager::getLockedFieldsStateKeyByContentEntity()
LockFieldsManager::getLockedFieldsByContentEntity in src/Smartling/LockFields/LockFieldsManager.php
Returns list of locked fields for a given entity.
LockFieldsManager::setLockedFields in src/Smartling/LockFields/LockFieldsManager.php
Saves list of locked fields for a given entity.

File

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

Class

LockFieldsManager
Class LockFieldsManager

Namespace

Drupal\tmgmt_smartling\Smartling\LockFields

Code

protected function getLockedFieldsStateKeyByContentEntity(EntityInterface $entity) {
  $lang_code = $entity
    ->get('default_langcode')
    ->getLangcode();
  $entity_type = $entity
    ->getEntityTypeId();
  $entity_id = $entity
    ->id();
  return "tmgmt_smartling.lock_fields.{$lang_code}.{$entity_type}.{$entity_id}";
}