You are here

public function NodeType::isLocked in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/node/src/Entity/NodeType.php \Drupal\node\Entity\NodeType::isLocked()
  2. 10 core/modules/node/src/Entity/NodeType.php \Drupal\node\Entity\NodeType::isLocked()

Determines whether the node type is locked.

Return value

string|false The module name that locks the type or FALSE.

Overrides NodeTypeInterface::isLocked

File

core/modules/node/src/Entity/NodeType.php, line 119

Class

NodeType
Defines the Node type configuration entity.

Namespace

Drupal\node\Entity

Code

public function isLocked() {
  $locked = \Drupal::state()
    ->get('node.type.locked');
  return isset($locked[$this
    ->id()]) ? $locked[$this
    ->id()] : FALSE;
}