mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-02-16 16:48:40 +00:00
impl. more static translations
This commit is contained in:
parent
ccd0a4f43e
commit
5a7d94e0f4
|
|
@ -36,19 +36,19 @@ final class Installer extends InstallerAbstract
|
||||||
* @param DatabasePool $dbPool Database pool
|
* @param DatabasePool $dbPool Database pool
|
||||||
* @param array $data Module info
|
* @param array $data Module info
|
||||||
*
|
*
|
||||||
* @return void
|
* @return array
|
||||||
*
|
*
|
||||||
* @throws PathException This exception is thrown if the Navigation install file couldn't be found
|
* @throws PathException This exception is thrown if the Navigation install file couldn't be found
|
||||||
* @throws \Exception This exception is thrown if the Navigation install file is invalid json
|
* @throws \Exception This exception is thrown if the Navigation install file is invalid json
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function installExternal(DatabasePool $dbPool, array $data) : void
|
public static function installExternal(DatabasePool $dbPool, array $data) : array
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$dbPool->get()->con->query('select 1 from `nav`');
|
$dbPool->get()->con->query('select 1 from `nav`');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return; // @codeCoverageIgnore
|
return []; // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
|
|
||||||
$navFile = \file_get_contents($data['path'] ?? '');
|
$navFile = \file_get_contents($data['path'] ?? '');
|
||||||
|
|
@ -64,6 +64,8 @@ final class Installer extends InstallerAbstract
|
||||||
foreach ($navData as $link) {
|
foreach ($navData as $link) {
|
||||||
self::installLink($dbPool, $link);
|
self::installLink($dbPool, $link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user