class LockFormCommand in Content locking (anti-concurrent editing) 8.2
Same name and namespace in other branches
- 8 src/Ajax/LockFormCommand.php \Drupal\content_lock\Ajax\LockFormCommand
Defines an AJAX command to lock current form.
Hierarchy
- class \Drupal\content_lock\Ajax\LockFormCommand implements CommandInterface
Expanded class hierarchy of LockFormCommand
1 file declares its use of LockFormCommand
- ContentLockController.php in src/
Controller/ ContentLockController.php
File
- src/
Ajax/ LockFormCommand.php, line 12
Namespace
Drupal\content_lock\AjaxView source
class LockFormCommand implements CommandInterface {
protected $lockable;
protected $lock;
/**
* LockFormCommand constructor.
*
* @param bool $lockable
* @param bool $lock
*/
public function __construct($lockable = FALSE, $lock = FALSE) {
$this->lockable = $lockable;
$this->lock = $lock;
}
/**
* {@inheritdoc}
*/
public function render() {
return [
'command' => 'lockForm',
'selector' => '',
'lockable' => $this->lockable,
'lock' => $this->lock,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LockFormCommand:: |
protected | property | ||
LockFormCommand:: |
protected | property | ||
LockFormCommand:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: |
|
LockFormCommand:: |
public | function | LockFormCommand constructor. |