mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 06:15:11 +00:00
22 lines
552 B
PHP
22 lines
552 B
PHP
<?php
|
|
|
|
namespace Code\Widget;
|
|
|
|
use Code\Render\Theme;
|
|
|
|
|
|
class Appstore implements WidgetInterface
|
|
{
|
|
|
|
public function widget(array $arguments): string
|
|
{
|
|
$store = ((argc() > 1 && argv(1) === 'available') ? 1 : 0);
|
|
return replace_macros(Theme::get_template('appstore.tpl'), [
|
|
'$title' => t('App Collections'),
|
|
'$options' => [
|
|
[z_root() . '/apps', t('Installed Apps'), 1 - $store],
|
|
[z_root() . '/apps/available', t('Available Apps'), $store]
|
|
]
|
|
]);
|
|
}
|
|
}
|