You are here

public static function ConnectorInfo::getLibVersion in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 src/Smartling/ConnectorInfo.php \Drupal\tmgmt_smartling\Smartling\ConnectorInfo::getLibVersion()

Returns module version.

Parameters

string $name:

string $default:

Return value

string

4 calls to ConnectorInfo::getLibVersion()
BufferLogger::flush in src/Logger/BufferLogger.php
Log messages into needed destination.
ConnectorInfo::getDependenciesVersionsAsString in src/Smartling/ConnectorInfo.php
ConnectorInfo::setUpCurrentClientInfo in src/Smartling/ConnectorInfo.php
Set up current client id and version.
ConnectorInfoTest::testGetLibVersion in tests/src/Kernel/ConnectorInfoTest.php

File

src/Smartling/ConnectorInfo.php, line 34
SmartlingApiFactory.php.

Class

ConnectorInfo
Class ConnectorInfo @package Drupal\tmgmt_smartling\Smartling

Namespace

Drupal\tmgmt_smartling\Smartling

Code

public static function getLibVersion($name = 'tmgmt_smartling', $default = 'unknown') {
  $info = system_get_info('module', $name);
  $client_version = $default;
  if (!empty($info['version'])) {
    $client_version = $info['version'];
  }
  return $client_version;
}