public function FileSetTemporary::execute in File Entity (fieldable files) 8.2
Executes the plugin.
Overrides ExecutableInterface::execute
File
- src/
Plugin/ Action/ FileSetTemporary.php, line 25
Class
- FileSetTemporary
- Sets the file status to temporary.
Namespace
Drupal\file_entity\Plugin\ActionCode
public function execute($entity = NULL) {
/** @var FileEntity $entity */
$entity
->setTemporary();
$entity
->save();
}