mirror of
https://github.com/kevachat/webapp.git
synced 2025-02-02 01:44:27 +00:00
add accountAddress filter
This commit is contained in:
parent
8ede658f33
commit
f36d22393a
@ -59,6 +59,13 @@ class AppExtension extends AbstractExtension
|
|||||||
'accountBalance'
|
'accountBalance'
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
new TwigFilter(
|
||||||
|
'account_address',
|
||||||
|
[
|
||||||
|
$this,
|
||||||
|
'accountAddress'
|
||||||
|
]
|
||||||
|
),
|
||||||
new TwigFilter(
|
new TwigFilter(
|
||||||
'message_to_markdown',
|
'message_to_markdown',
|
||||||
[
|
[
|
||||||
@ -297,6 +304,24 @@ class AppExtension extends AbstractExtension
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function accountAddress(
|
||||||
|
string $account
|
||||||
|
): ?string
|
||||||
|
{
|
||||||
|
// Connect kevacoin
|
||||||
|
$client = new \Kevachat\Kevacoin\Client(
|
||||||
|
$this->container->getParameter('app.kevacoin.protocol'),
|
||||||
|
$this->container->getParameter('app.kevacoin.host'),
|
||||||
|
$this->container->getParameter('app.kevacoin.port'),
|
||||||
|
$this->container->getParameter('app.kevacoin.username'),
|
||||||
|
$this->container->getParameter('app.kevacoin.password')
|
||||||
|
);
|
||||||
|
|
||||||
|
return $client->getAccountAddress(
|
||||||
|
$account
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function messageToMarkdown(
|
public function messageToMarkdown(
|
||||||
string $text
|
string $text
|
||||||
): string
|
): string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user