Elgg  Version master
Variables
chooserestoredestination.php File Reference

Go to the source code of this file.

Variables

 $guid = (int) get_input('entity_guid')
 Action for choosing destination to restore a post to. More...
 
 $destination_container_guid = (array) get_input('destination_container_guid')
 
if(empty($guid)||empty($destination_container_guid)) $entity
 
if(!$entity instanceof\ElggEntity||!$entity->isDeleted()) $new_container = get_entity($destination_container_guid[0])
 
if(!$new_container instanceof\ElggEntity) if(!$new_container->canWriteToContainer(0, $entity->type, $entity->subtype)) $display_name = $entity->getDisplayName() ?: elgg_echo('entity:restore:item')
 
if(!$entity->restore()) $entity container_guid = $new_container->guid
 
if(!$entity->save()) $success_keys
 
 $message = ''
 

Variable Documentation

$destination_container_guid = (array) get_input('destination_container_guid')

Definition at line 7 of file chooserestoredestination.php.

if (!$new_container instanceof\ElggEntity) if (!$new_container->canWriteToContainer(0, $entity->type, $entity->subtype)) $display_name = $entity->getDisplayName() ?: elgg_echo('entity:restore:item')

Definition at line 36 of file chooserestoredestination.php.

if (empty($guid)||empty($destination_container_guid)) $entity
Initial value:
return get_entity($guid);
})
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
Definition: elgglib.php:304
$guid
Action for choosing destination to restore a post to.
const ELGG_SHOW_DISABLED_ENTITIES
Definition: constants.php:132
get_entity(int $guid)
Loads and returns an entity object from a guid.
Definition: entities.php:70
const ELGG_SHOW_DELETED_ENTITIES
Definition: constants.php:136

Definition at line 19 of file chooserestoredestination.php.

$guid = (int) get_input('entity_guid')

Action for choosing destination to restore a post to.

Definition at line 6 of file chooserestoredestination.php.

$message = ''

Definition at line 53 of file chooserestoredestination.php.

if (!$entity instanceof\ElggEntity||!$entity->isDeleted()) $new_container = get_entity($destination_container_guid[0])

Definition at line 26 of file chooserestoredestination.php.

if (!$entity->save()) $success_keys
Initial value:
= [
"entity:restore:{$entity->type}:{$entity->subtype}:success",
"entity:restore:{$entity->type}:success",
'entity:restore:success',
]

Definition at line 47 of file chooserestoredestination.php.

if (!$entity->restore()) $entity container_guid = $new_container->guid

Definition at line 42 of file chooserestoredestination.php.