Elgg  Version master
type.php
Go to the documentation of this file.
1 <?php
11 if (!isset($type_text)) {
12  $entity = elgg_extract('entity', $vars);
13  if ($entity instanceof \ElggEntity) {
14  $type_text = ucwords($entity->getSubtype());
15  $lan_keys = [
16  "item:{$entity->getType()}:{$entity->getSubtype()}",
17  "collection:{$entity->getType()}:{$entity->getSubtype()}",
18  ];
19  foreach ($lan_keys as $key) {
20  if (!elgg_language_key_exists($key)) {
21  continue;
22  }
23 
24  $type_text = elgg_echo($key);
25  break;
26  }
27 
28  $type_text = elgg_echo('trash:imprint:type', [$type_text]);
29  }
30 }
31 
33  return;
34 }
35 
36 echo elgg_view('trash/elements/imprint/element', [
37  'icon_name' => elgg_extract('type_icon', $vars, false),
38  'content' => $type_text,
39  'class' => 'elgg-listing-type',
40 ]);
$type_text
Display information about the type of the deleted entity.
Definition: type.php:10
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
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
elgg_language_key_exists(string $key, string $language= 'en')
Check if a given language key exists.
Definition: languages.php:44
$entity
Definition: reset.php:8
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
Definition: summary.php:44
$vars
Definition: theme.php:5