Elgg  Version master
actor.php
Go to the documentation of this file.
1 <?php
11 if (!isset($actor_text)) {
12  $entity = elgg_extract('entity', $vars);
13  if ($entity instanceof \ElggEntity) {
14  $actors = $entity->getEntitiesFromRelationship([
15  'type' => 'user',
16  'relationship' => 'deleted_by',
17  'inverse_relationship' => true,
18  'limit' => 1,
19  ]);
20  if (!empty($actors)) {
21  /* @var $actor \ElggUser */
22  $actor = $actors[0];
23 
24  if (!$actor->isDeleted()) {
26  } else {
28  }
29 
30  $actor_text = elgg_echo('trash:imprint:actor', [$actor_text]);
31  }
32  }
33 }
34 
36  return;
37 }
38 
39 echo elgg_view('trash/elements/imprint/element', [
40  'icon_name' => elgg_extract('actor_icon', $vars, 'user'),
41  'content' => $actor_text,
42  'class' => 'elgg-listing-actor',
43 ]);
if(($owner instanceof\ElggGroup||$owner instanceof\ElggUser)&&!in_array($owner->guid, $mute_guids)) $actor
Definition: mute.php:86
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$actor_text
Display information about who deleted a given entity.
Definition: actor.php:10
elgg_is_empty($value)
Check if a value isn&#39;t empty, but allow 0 and &#39;0&#39;.
Definition: input.php:176
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$entity
Definition: reset.php:8
isDeleted()
Is the entity marked as deleted.
$vars
Definition: theme.php:5
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.
Definition: views.php:1444
getDisplayName()
Get the entity&#39;s display name.
Definition: ElggEntity.php:324