streams/Code/Widget/Appstore.php

23 lines
505 B
PHP
Raw Normal View History

2018-07-05 06:20:35 +00:00
<?php
2022-02-16 04:08:28 +00:00
namespace Code\Widget;
2018-07-05 06:20:35 +00:00
2022-02-16 04:08:28 +00:00
use Code\Render\Theme;
2022-02-12 20:43:29 +00:00
2021-12-02 23:02:31 +00:00
class Appstore
{
2018-07-05 06:20:35 +00:00
2021-12-02 23:02:31 +00:00
public function widget($arr)
{
$store = ((argc() > 1 && argv(1) === 'available') ? 1 : 0);
2022-02-12 20:43:29 +00:00
return replace_macros(Theme::get_template('appstore.tpl'), [
2021-12-02 23:02:31 +00:00
'$title' => t('App Collections'),
'$options' => [
[z_root() . '/apps', t('Installed Apps'), 1 - $store],
[z_root() . '/apps/available', t('Available Apps'), $store]
]
]);
}
2018-09-12 09:08:53 +00:00
}