Piwik\Notification::getPriority PHP Method

getPriority() public method

Returns the notification's priority. If no priority has been set, a priority will be set based on the notification's context.
public getPriority ( ) : integer
return integer
    public function getPriority()
    {
        if (!isset($this->priority)) {
            $typeToPriority = array(static::CONTEXT_ERROR => static::PRIORITY_MAX, static::CONTEXT_WARNING => static::PRIORITY_HIGH, static::CONTEXT_SUCCESS => static::PRIORITY_MIN, static::CONTEXT_INFO => static::PRIORITY_LOW);
            if (array_key_exists($this->context, $typeToPriority)) {
                return $typeToPriority[$this->context];
            }
            return static::PRIORITY_LOW;
        }
        return $this->priority;
    }