You are here

public function ContentLock::isTranslationLockEnabled in Content locking (anti-concurrent editing) 8.2

Same name and namespace in other branches
  1. 8 src/ContentLock/ContentLock.php \Drupal\content_lock\ContentLock\ContentLock::isTranslationLockEnabled()

Checks whether the entity type is lockable on translation level.

Parameters

string $entity_type_id: The entity type ID.

Return value

bool TRUE if the entity type should be locked on translation level, FALSE if it should be locked on entity level.

7 calls to ContentLock::isTranslationLockEnabled()
ContentLock::fetchLock in src/ContentLock/ContentLock.php
Fetch the lock for an entity.
ContentLock::isLockedBy in src/ContentLock/ContentLock.php
Check lock status.
ContentLock::locking in src/ContentLock/ContentLock.php
Try to lock a document for editing.
ContentLock::lockingDelete in src/ContentLock/ContentLock.php
Delete locking item from database.
ContentLock::lockingSave in src/ContentLock/ContentLock.php
Save locking into database.

... See full list

File

src/ContentLock/ContentLock.php, line 597

Class

ContentLock
Class ContentLock.

Namespace

Drupal\content_lock\ContentLock

Code

public function isTranslationLockEnabled($entity_type_id) {
  return $this->moduleHandler
    ->moduleExists('conflict') && in_array($entity_type_id, $this->config
    ->get("types_translation_lock"));
}