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