public function unlockResource(KCommandContext $context) { if (!$this->canEdit()) { return; } return parent::unlockResource($context); }
public function __construct(KConfig $config) { parent::__construct($config); $this->registerCallback('before.browse' , array($this, 'setReferrer')); }
/** * Only unlock entities in administrator or in form layouts in site * * {@inheritdoc} */ protected function _unlockResource(KControllerContextInterface $context) { $domain = $this->getMixer()->getIdentifier()->domain; if ($domain === 'admin' || $this->getRequest()->query->layout === 'form') { parent::_unlockResource($context); } }