Returns prettified and translated text that describes when a report was last updated.

@return string
175427
private function makePrettyArchivedOnText()
    {
        $dateText = $this->metadata[DataTable::ARCHIVED_DATE_METADATA_NAME];
        $date     = Date::factory($dateText);
        $today    = mktime(0, 0, 0);

        if ($date->getTimestamp() > $today) {
            $elapsedSeconds = time() - $date->getTimestamp();
            $timeAgo        = $this->metricsFormatter->getPrettyTimeFromSeconds($elapsedSeconds);

            return Piwik::translate('CoreHome_ReportGeneratedXAgo', $timeAgo);
        }

        $prettyDate = $date->getLocalized(Date::DATE_FORMAT_SHORT);

        $timezoneAppend = ' (UTC)';
        return Piwik::translate('CoreHome_ReportGeneratedOn', $prettyDate) . $timezoneAppend;
    }
1093705
public function getLastLoggedAtAttribute()
    {
        $lastLogin = Logs::where('user_id', $this->id)
                ->where('name', 'like', 'USERAUTHLISTENER_ONUSERLOGIN')
                ->orderBy('created_at', 'desc')
                ->get(['created_at'])
                ->first();

        return ($lastLogin) ? $lastLogin->created_at->diffForHumans() : 'never';
    }
596184
public function getErrorText()
    {
        $message = '';
        if ($this->isError()) {
            $message = $this->messages->message[0]->text;
            if (@$this->transactionResponse->errors[0]->errorText) {
                $message = $this->transactionResponse->errors[0]->errorText;
            }
        }
        return $message;
    }
729091
public function getLastModified()
	{
		if ($this->lastModified == null) {
			$this->requestHead();
		}
		return $this->lastModified == null ? new \DateTime() : $this->lastModified;
	}
127410
public function getTextOutput()
    {
        $patchLevel = $this->getPatchLevel();

        $commands     = array(sprintf('-- Patch level %d structural changes', $patchLevel));
        $lastLocation = '';
        $lastName     = '';
        $noOutput     = true;
        foreach ($this->getStructuralPatches($patchLevel) as $patch) {
            if ($patch['gpa_location'] != $lastLocation) {
                $commands[] = sprintf("\n-- DATABASE LOCATION: %s", $patch['gpa_location']);
                $lastLocation = $patch['gpa_location'];
            }
            if ($patch['gpa_name'] != $lastName) {
                $commands[] = sprintf("\n-- PATCH: %s", $patch['gpa_name']);
                $lastName = $patch['gpa_name'];
            }
            $commands[] = $patch['gpa_sql'] . ';';
            $noOutput = false;
        }

        if ($noOutput) {
            $commands[] = sprintf("\n-- No structural changes in patchlevel %d", $patchLevel);
        }
        $commands[] = '';

        return implode("\n", $commands);
    }
1204864
public function getLastLine()
    {
        if (!$this->lastStatement) {
            $this->lastStatement = $this->statements[\count($this->statements) - 1];
        }
    }
851923
public function getPrevious()
    {
        $prev = $this;
        $find = false;
        if (!is_null($this->parent)) {
            foreach ($this->parent->content as $c) {
                if ($c === $this) {
                    $find=true;
                    break;
                }
                if (!$find) {
                    $prev = $c;
                }
            }
        }
        return $prev;
    }
1009661
public String getLastUpdatedString() {
        long newestTs = 0;
        for (UpdateSite s : sites) {
            if (s.getDataTimestamp()>newestTs) {
                newestTs = s.getDataTimestamp();
            }
        }
        if (newestTs == 0) {
            return Messages.UpdateCenter_n_a();
        }
        return Util.getPastTimeString(System.currentTimeMillis()-newestTs);
    }
305868
public function getPreviousCharacter()
	{
		$previous = prev($this->characters);

		if ($previous === false && $this->chunker->hasPreviousChunk()) {
			$this->read($this->chunker->getPreviousChunk());
			$previous = end($this->characters);
		}
		
		return $previous;
	}
322366
public function getOnEmptyText()
    {
        static $warned;

        $dir = $this->getPath(false, 'index');

        if (! is_dir($dir)) {
            try {
                \MUtil_File::ensureDir($dir);

            } catch (\Zend_Exception $e) {
                $text = $e->getMessage();

                if (! $warned) {
                    $warned = true;
                    $this->addMessage($text);
                }
                return $text;
            }
        }

        return parent::getOnEmptyText();
    }
787494
public function getStatusText()
    {
        $statusCode = $this->getStatusCode();

        if (!isset($this->defaultStatusTextList[$statusCode])) {
            return '';
        }

        return $this->defaultStatusTextList[$statusCode];
    }
873472
public function asText(): string
    {
        if ($this->keyword === self::KEYWORD_STILLBORN) {
            // I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (stillborn)
            return I18N::translate('(stillborn)');
        }

        if ($this->keyword === self::KEYWORD_INFANT) {
            // I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (in infancy)
            return I18N::translate('(in infancy)');
        }

        if ($this->keyword === self::KEYWORD_CHILD) {
            // I18N: An individual’s age at an event. e.g. Died 14 Jan 1900 (in childhood)
            return I18N::translate('(in childhood)');
        }

        $age = [];

        // Show a zero age as "0 years", not "0 days"
        if ($this->years > 0 || $this->months === 0 && $this->weeks === 0 && $this->days === 0) {
            // I18N: Part of an age string. e.g. 5 years, 4 months and 3 days
            $age[] = I18N::plural('%s year', '%s years', $this->years, I18N::number($this->years));
        }

        if ($this->months > 0) {
            // I18N: Part of an age string. e.g. 5 years, 4 months and 3 days
            $age[] = I18N::plural('%s month', '%s months', $this->months, I18N::number($this->months));
        }

        if ($this->weeks > 0) {
            // I18N: Part of an age string. e.g. 5 years, 4 months and 3 days
            $age[] = I18N::plural('%s week', '%s weeks', $this->weeks, I18N::number($this->weeks));
        }

        if ($this->days > 0) {
            // I18N: Part of an age string. e.g. 5 years, 4 months and 3 days
            $age[] = I18N::plural('%s day', '%s days', $this->days, I18N::number($this->days));
        }

        // If an age is just a number of years, only show the number
        if ($this->years > 0 && $this->months === 0 && $this->weeks === 0 && $this->days === 0) {
            $age = [I18N::number($this->years)];
        }

        $age_string = implode(I18N::$list_separator, $age);

        if ($this->qualifier === self::SYMBOL_LESS_THAN) {
            // I18N: Description of an individual’s age at an event. For example, Died 14 Jan 1900 (aged less than 21 years)
            return I18N::translate('(aged less than %s)', $age_string);
        }

        if ($this->qualifier === self::SYMBOL_MORE_THAN) {
            // I18N: Description of an individual’s age at an event. For example, Died 14 Jan 1900 (aged more than 21 years)
            return I18N::translate('(aged more than %s)', $age_string);
        }

        // I18N: Description of an individual’s age at an event. For example, Died 14 Jan 1900 (aged 43 years)
        return I18N::translate('(aged %s)', $age_string);
    }
696345
public function getLastModified()
	{
		$mtime = 0;
		
		foreach($this->modules as $module)
		{
			$mtime = max($mtime, filemtime((new \ReflectionClass(get_class($module)))->getFileName()));
		}
		
		return $mtime;
	}
989140
public function prevNews()
    {
        $prev = $this->newsManager()->prev();

        if (!$prev) {
            return null;
        }

        return $this->newsFormatNav($prev);
    }
80032
protected function getActionText()
    {
        if ($this->hasBeenSent()) {
            $action = 'action_sent';
        } elseif ($this->isSendingPrevented()) {
            $action = 'action_not_sent';
        } else {
            $action = 'action_unknown';
        }
        return $this->t($action);
    }
477032
final public function getMyMessage()
    {
        $msg = "\n" . "check in:" . date('Y-m-d H:i:s', time()) . "\n";
        $msg .= "MSG:" . $this->getMessage() . "\n";
        $msg .= "STATUS:" . $this-> getStatus()['status'] . "\n";
        $msg .= "STATUS MSG:" . $this-> getStatus()['msg'] . "\n";
        $msg .= "FILE:" . $this->getFile() . "\n";
        $msg .= "LINE:" . $this->getLine() . "\n";
        $msg .= "Trace:\n" . $this->getTraceAsString() . "\n";
        $this->msg = $msg;
        return $this->msg;
    }
560778
protected function getText()
    {
        if ($this->value === null) {
            $text = $this->text;
        } elseif (is_array($this->value)) {
            $text = vsprintf($this->text, $this->value);
        } else {
            $text = sprintf($this->text, $this->value);
        }

        return $text;
    }