public static function DatabaseFileUtilityBase::getPath in Smart IP 8.2
Same name and namespace in other branches
- 8.4 src/DatabaseFileUtilityBase.php \Drupal\smart_ip\DatabaseFileUtilityBase::getPath()
- 8.3 src/DatabaseFileUtilityBase.php \Drupal\smart_ip\DatabaseFileUtilityBase::getPath()
Get Smart IP's data source module's database file's path. This should return the fixed Drupal folder if auto update is on or if custom path is empty with auto update off.
Parameters
bool $autoUpdate:
string $customPath:
Return value
string
Overrides DatabaseFileUtilityInterface::getPath
File
- src/
DatabaseFileUtilityBase.php, line 64 - Contains \Drupal\smart_ip\DatabaseFileUtilityBase.
Class
- DatabaseFileUtilityBase
- Database file utility methods class wrapper.
Namespace
Drupal\smart_ipCode
public static function getPath($autoUpdate, $customPath) {
if ($autoUpdate == TRUE || $autoUpdate == FALSE && empty($customPath)) {
/** @var \Drupal\Core\File\FileSystem $filesystem */
$filesystem = \Drupal::service('file_system');
return $filesystem
->realpath(self::DRUPAL_FOLDER);
}
return $customPath;
}