36 if (!str_contains($relationship,
'notify:')) {
40 $parts = explode(
':', $relationship);
41 if (
count($parts) > 2) {
64 '#type' =>
'checkboxes',
65 '#class' =>
'elgg-subscription-methods',
66 'name' =>
"subscriptions[{$entity->guid}][notify]",
69 'align' =>
'horizontal',
81 'title' =>
elgg_echo(
'notifications:subscriptions:record:settings'),
82 'icon' =>
'chevron-down',
85 'user_guid' =>
$user->guid,
92 'icon' =>
'chevron-up',
$user
Generic view to set a notification preference for a specific purpose.
elgg_require_css(string $view)
Register a CSS view name to be included in the HTML head.
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
elgg_view_image_block(string $image, string $body, array $vars=[])
Wrapper function for the image block display pattern.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
$relationship
Elgg default relationship view.
if(!$user instanceof\ElggUser||empty($description)||empty($purpose)) $methods
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
foreach($methods as $method) $container
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
elgg_view_entity_icon(\ElggEntity $entity, string $size= 'medium', array $vars=[])
View the icon of an entity.
elgg_import_esm(string $name)
Helper functions for external files like css/js.
elgg_http_add_url_query_elements(string $url, array $elements)
Sets elements in a URL's query string.
$has_detailed_subscriptions
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
elgg_get_notification_methods()
Returns registered delivery methods for notifications [ 'email' => 'email', 'sms' => 'sms'...
if(empty($methods)) $method_options
elgg_view_entity_url(\ElggEntity $entity, array $options=[])
Helper function for outputting a link to an entity.