20 if (!
$user->canEdit()) {
36 foreach (
$entity->getSubscriptions(
$user->guid) as $subscription) {
37 $parts = explode(
':', $subscription->relationship);
38 if (
count($parts) > 2) {
51 if (!$handler::isConfigurableByUser()) {
56 if (!$handler::isConfigurableForEntity(
$entity)) {
62 '#type' =>
'checkboxes',
64 '#class' =>
'elgg-subscription-details',
65 'name' =>
"subscriptions[{$entity->guid}][notify:{$type}:{$subtype}:{$action}]",
68 'align' =>
'horizontal',
75 echo
elgg_view(
'page/components/no_results', [
76 'no_results' =>
elgg_echo(
'notifications:subscriptions:details:no_results'),
81 ksort(
$details, SORT_NATURAL | SORT_FLAG_CASE);
85 '#type' =>
'fieldset',
87 'align' =>
'horizontal',
92 'text' =>
elgg_echo(
'notifications:subscriptions:details:reset'),
93 'class' => [
'elgg-button-delete',
'elgg-subscriptions-details-reset'],
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
if(empty($methods)) $method_options
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Thrown when page is not accessible.
get_entity(int $guid)
Loads and returns an entity object from a guid.
Thrown when entity can not be edited or container permissions do not allow it to be written...
if(!$menu instanceof\Elgg\Menu\PreparedMenu) $actions
foreach($entity->getSubscriptions($user->guid) as $subscription) $notification_events
Thrown when request is malformatted.
if(!$user instanceof\ElggUser||!$entity instanceof\ElggEntity) if(!$user->canEdit()) $methods
elgg_get_notification_methods()
Returns registered delivery methods for notifications [ 'email' => 'email', 'sms' => 'sms'...
$entity
Ajax view to list user details on admin listings.
elgg_get_notification_events()
Get the registered notification events in the format.
foreach($methods as $method) $detailed_subscriptions