public static function findActiveLock($strTable, $intEntity, \Module $objModule = null) { $t = static::$strTable; $intLockInterval = EntityLock::getLockIntervalInSeconds($strTable, $objModule); $arrColumns = array("{$t}.parentTable=?", "{$t}.pid=?"); $arrValues = array($strTable, $intEntity); if ($intLockInterval !== null && $intLockInterval > 0) { $arrColumns[] = "UNIX_TIMESTAMP() < {$t}.locked + ?"; $arrValues[] = $intLockInterval; } return static::findBy($arrColumns, $arrValues); }
public function generateUnlockForm($objItem, $objLock) { return \HeimrichHannot\EntityLock\EntityLock::generateUnlockForm($this->formHybridDataContainer, $objItem, $objLock, $this); }