Flarum\Foundation\Application::version PHP Method

version() public method

Get the version number of the application.
public version ( ) : string
return string
    public function version()
    {
        return static::VERSION;
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 protected function getDefaultAttributes($model)
 {
     $attributes = ['title' => $this->settings->get('forum_title'), 'description' => $this->settings->get('forum_description'), 'baseUrl' => $url = $this->app->url(), 'basePath' => parse_url($url, PHP_URL_PATH) ?: '', 'debug' => $this->app->inDebugMode(), 'apiUrl' => $this->app->url('api'), 'welcomeTitle' => $this->settings->get('welcome_title'), 'welcomeMessage' => $this->settings->get('welcome_message'), 'themePrimaryColor' => $this->settings->get('theme_primary_color'), 'themeSecondaryColor' => $this->settings->get('theme_secondary_color'), 'logoUrl' => $this->getLogoUrl(), 'faviconUrl' => $this->getFaviconUrl(), 'headerHtml' => $this->settings->get('custom_header'), 'allowSignUp' => (bool) $this->settings->get('allow_sign_up'), 'defaultRoute' => $this->settings->get('default_route'), 'canViewDiscussions' => $this->actor->can('viewDiscussions'), 'canStartDiscussion' => $this->actor->can('startDiscussion')];
     if ($this->actor->can('administrate')) {
         $attributes['adminUrl'] = $this->app->url('admin');
         $attributes['version'] = $this->app->version();
     }
     return $attributes;
 }
All Usage Examples Of Flarum\Foundation\Application::version