Returns all notifications for a principal.

@return array
168872
public function getChildren()
    {
        $children = [];
        $notifications = $this->caldavBackend->getNotificationsForPrincipal($this->principalUri);

        foreach ($notifications as $notification) {
            $children[] = new Node(
                $this->caldavBackend,
                $this->principalUri,
                $notification
            );
        }

        return $children;
    }
1153775
protected function _getRoleNames()
    {
        $names = [];
        if (!$this->has('roles')) {
            return $names;
        }
        foreach ($this->roles as $k => $role) {
            $names[] = $role->name;
        }

        return $names;
    }
409259
public function getPersonalData(): array
    {
        $photo = $this->input('photo_id');

        if (is_array($photo) && !$photo) {
            $photo = null;
        }

        return [
            'first_name' => $this->input('first_name'),
            'last_name' => $this->input('last_name'),
            'photo_id' => $photo,
            'description' => $this->input('description'),
            'phone' => $this->input('phone'),
            'address' => $this->input('address'),
            'notification_email' => $this->input('notification_email'),
        ];
    }
1045885
public function getAllRoleIds()
    {
        $ids = array();
        foreach ($this->getAllRoles() as $role) {
            $ids[] = $role->getId();
        }
        return $ids;
    }
149109
protected function getNotification()
    {
        if ($header = $this->read()) {
            $header = $this->parseData($header);

            $payload = $this->read($header['len']);
            $payload = explode("\n", $payload, 2);
            isset($payload[1]) or $payload[1] = null;

            list($payload, $body) = $payload;

            $payload = $this->parseData($payload);

            return new Notification($header, $payload, $body);
        }
    }
1374370
public function getRoles()
    {
        $user       = $this;
        $comparator = function ($level) use ($user) {
            return $user->hasAccessLevel($level);
        };

        // Fallback for PHP < 5.6 which do not support ARRAY_FILTER_USE_KEY.
        if (version_compare(PHP_VERSION, '5.6', '<')) {
            $filtered = array_flip(array_filter(array_keys(self::$roleMap), $comparator));
            return array_values(array_intersect_key(self::$roleMap, $filtered));
        }

        return array_values(array_filter(self::$roleMap, $comparator, ARRAY_FILTER_USE_KEY));
    }
1307107
public function getMessages()
    {
        $messages = parent::getMessages();

        foreach ($this->pages as $page) {
            $messages = array_merge($messages, $page->getMessages());
        }

        return $messages;
    }
1245693
public function getMessages()
    {
        $messages = parent::getMessages();
        if ($this->tile !== null) {
            $messages = array_merge($messages, $this->tile->getMessages());
        }

        return $messages;
    }
824686
public function all()
    {
        if ( $this->subject == 'user' ) {
            return $this->getUserPermissions( $this->user );
        } elseif ( $this->subject == 'role' ) {
            return $this->getRolePermissions( $this->role );
        }
    }
48546
public function deleteAll()
    {
        $responses = array();
        $notifications = self::paginatedList();
        if ($notifications['success']) {
            foreach ($notifications['response']['data'] as $notification) {
                $responses[] = self::delete($notification->uuid);
            }
        } else {
            return array($notifications);
        }
        return $responses;
    }
161279
public function notifynderNotifications()
    {
        $model = app('notifynder.resolver.model')->getModel(Notification::class);
        if (notifynder_config()->isPolymorphic()) {
            return $this->morphMany($model, 'to');
        }

        return $this->hasMany($model, 'to_id');
    }
951931
public function getAll() {
		if ($this->hasAny()) {
			$messages = $_SESSION[self::SESSION_KEY_FLASH];

			$_SESSION[self::SESSION_KEY_FLASH] = [];

			return $messages;
		}
		else {
			return [];
		}
	}
173655
public function getChildren()
    {
        $r = [];
        if ($this->principalBackend->getPrincipalByPath($this->getPrincipalURL().'/calendar-proxy-read')) {
            $r[] = new ProxyRead($this->principalBackend, $this->principalProperties);
        }
        if ($this->principalBackend->getPrincipalByPath($this->getPrincipalURL().'/calendar-proxy-write')) {
            $r[] = new ProxyWrite($this->principalBackend, $this->principalProperties);
        }

        return $r;
    }
878454
private function getRoleIds()
    {
        $assign_to_roles = $this->option('assign-to-roles');

        if ($assign_to_roles) {
            $role_ids = explode(',', $assign_to_roles);

            return array_map('intval', $role_ids);
        }

        return [];
    }
198623
private function get_notifications(stdClass $user, ?int $groupid) : array {
        $notifications = $this->notifications;
        $forum = $this->forum;
        $renderer = $this->renderer;
        $capabilitymanager = $this->capabilitymanager;

        if ($forum->is_cutoff_date_reached()) {
            $notifications[] = (new notification(
                    get_string('cutoffdatereached', 'forum'),
                    notification::NOTIFY_INFO
            ))->set_show_closebutton();
        } else if ($forum->is_due_date_reached()) {
            $notifications[] = (new notification(
                    get_string('thisforumisdue', 'forum', userdate($forum->get_due_date())),
                    notification::NOTIFY_INFO
            ))->set_show_closebutton();
        } else if ($forum->has_due_date()) {
            $notifications[] = (new notification(
                    get_string('thisforumhasduedate', 'forum', userdate($forum->get_due_date())),
                    notification::NOTIFY_INFO
            ))->set_show_closebutton();
        }

        if ($forum->has_blocking_enabled()) {
            $notifications[] = (new notification(
                get_string('thisforumisthrottled', 'forum', [
                    'blockafter' => $forum->get_block_after(),
                    'blockperiod' => get_string('secondstotime' . $forum->get_block_period())
                ])
            ))->set_show_closebutton();
        }

        if ($forum->is_in_group_mode() && !$capabilitymanager->can_access_all_groups($user)) {
            if ($groupid === null) {
                if (!$capabilitymanager->can_post_to_my_groups($user)) {
                    $notifications[] = (new notification(
                        get_string('cannotadddiscussiongroup', 'mod_forum'),
                        \core\output\notification::NOTIFY_WARNING
                    ))->set_show_closebutton();
                } else {
                    $notifications[] = (new notification(
                        get_string('cannotadddiscussionall', 'mod_forum'),
                        \core\output\notification::NOTIFY_WARNING
                    ))->set_show_closebutton();
                }
            } else if (!$capabilitymanager->can_access_group($user, $groupid)) {
                $notifications[] = (new notification(
                    get_string('cannotadddiscussion', 'mod_forum'),
                    \core\output\notification::NOTIFY_WARNING
                ))->set_show_closebutton();
            }
        }

        if ('qanda' === $forum->get_type() && !$capabilitymanager->can_manage_forum($user)) {
            $notifications[] = (new notification(
                get_string('qandanotify', 'forum'),
                notification::NOTIFY_INFO
            ))->set_show_closebutton();
        }

        if ('eachuser' === $forum->get_type()) {
            $notifications[] = (new notification(
                get_string('allowsdiscussions', 'forum'),
                notification::NOTIFY_INFO)
            )->set_show_closebutton();
        }

        return array_map(function($notification) {
            return $notification->export_for_template($this->renderer);
        }, $notifications);
    }
553187
private function getRemainingIpnFields()
    {
        $ipnMessage = $this->returnMessage();

        $remainingFields = array(
                            'NotificationReferenceId' =>$ipnMessage['NotificationReferenceId'],
                            'NotificationType' =>$ipnMessage['NotificationType'],
                            'SellerId' =>$ipnMessage['SellerId'],
                            'ReleaseEnvironment' =>$ipnMessage['ReleaseEnvironment'] );

        return $remainingFields;
    }
979269
public function getAvailableRoles()
    {
        Piwik::checkUserHasSomeAdminAccess();

        $response = array();

        foreach ($this->roleProvider->getAllRoles() as $role) {
            $response[] = array(
                'id' => $role->getId(),
                'name' => $role->getName(),
                'description' => $role->getDescription(),
                'helpUrl' => $role->getHelpUrl(),
            );
        }

        return $response;
    }