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'],
$entity
Ajax view to list user details on admin listings.
Thrown when request is malformatted.
Thrown when entity can not be edited or container permissions do not allow it to be written.
Thrown when page is not accessible.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
get_entity(int $guid)
Loads and returns an entity object from a guid.
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
elgg_view(string $view, array $vars=[], string $viewtype='')
Return a parsed view.
elgg_get_notification_events()
Get the registered notification events in the format.
elgg_get_notification_methods()
Returns registered delivery methods for notifications [ 'email' => 'email', 'sms' => 'sms',...
if(empty($methods)) $method_options
foreach($methods as $method) $detailed_subscriptions
if(! $user instanceof \ElggUser||! $entity instanceof \ElggEntity) if(! $user->canEdit()) $methods
foreach($entity->getSubscriptions($user->guid) as $subscription) $notification_events
if(! $menu instanceof \Elgg\Menu\PreparedMenu) $actions