Elgg  Version master
set_robots.php
Go to the documentation of this file.
1 <?php
7 
8 echo elgg_view_field([
9  '#type' => 'plaintext',
10  '#label' => elgg_echo('admin:robots.txt:instructions'),
11  'name' => 'text',
12  'value' => $site->getMetadata('robots.txt'),
13 ]);
14 
15 echo elgg_view_field([
16  '#type' => 'plaintext',
17  '#label' => elgg_echo('admin:robots.txt:plugins'),
18  'value' => elgg_trigger_event_results('robots.txt', 'site', ['site' => $site], ''),
19  'readonly' => true,
20 ]);
21 
23  '#type' => 'submit',
24  'text' => elgg_echo('save'),
25 ]);
26 
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
$footer
Definition: set_robots.php:22
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_trigger_event_results(string $event, string $type, array $params=[], $returnvalue=null)
Triggers an event where it is expected that the mixed return value could be manipulated by event call...
Definition: events.php:117
$site
Definition: set_robots.php:8
elgg_set_form_footer(string $footer= '')
Sets form footer and defers its rendering until the form view and extensions have been rendered...
Definition: views.php:1046
elgg_get_site_entity()
Get the current site entity.
Definition: entities.php:101