Elgg  Version 6.1
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  'limit' => 1,
18  ]);
19  if (!empty($actors)) {
20  /* @var $actor \ElggUser */
21  $actor = $actors[0];
22 
23  if (!$actor->isDeleted()) {
25  } else {
27  }
28 
29  $actor_text = elgg_echo('trash:imprint:actor', [$actor_text]);
30  }
31  }
32 }
33 
35  return;
36 }
37 
38 echo elgg_view('trash/elements/imprint/element', [
39  'icon_name' => elgg_extract('actor_icon', $vars, 'user'),
40  'content' => $actor_text,
41  'class' => 'elgg-listing-actor',
42 ]);
if(($owner instanceof\ElggGroup||$owner instanceof\ElggUser)&&!in_array($owner->guid, $mute_guids)) $actor
Definition: mute.php:78
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:256
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:306