function TempStoreTrait::isLocked

See also

\Drupal\rules\Ui\RulesUiHandlerInterface::isLocked()

2 calls to TempStoreTrait::isLocked()
TempStoreTrait::addLockInformation in src/Ui/TempStoreTrait.php
TempStoreTrait::validateLock in src/Ui/TempStoreTrait.php

File

src/Ui/TempStoreTrait.php, line 182

Class

TempStoreTrait
Provides methods for modified rules components in temporary storage.

Namespace

Drupal\rules\Ui

Code

public function isLocked() {
    // If there is an object in the temporary storage from another user then
    // this component is locked.
    if ($this->getTempStore()
        ->get($this->getTempStoreItemId()) && !$this->getTempStore()
        ->getIfOwner($this->getTempStoreItemId())) {
        return TRUE;
    }
    return FALSE;
}