You are here

public function ContentLock::isFormOperationLockEnabled 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::isFormOperationLockEnabled()

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.

8 calls to ContentLock::isFormOperationLockEnabled()
ContentLock::fetchLock in src/ContentLock/ContentLock.php
Fetch the lock for an entity.
ContentLock::isLockable in src/ContentLock/ContentLock.php
Check whether a node is configured to be protected by content_lock.
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.

... See full list

File

src/ContentLock/ContentLock.php, line 611

Class

ContentLock
Class ContentLock.

Namespace

Drupal\content_lock\ContentLock

Code

public function isFormOperationLockEnabled($entity_type_id) {
  return $this->config
    ->get("form_op_lock.{$entity_type_id}.mode") != self::FORM_OP_MODE_DISABLED;
}