aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Appstore.php
blob: d8499152ab4cf009d24670fbe9d055c628bc5c50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

/**
 *   * Name: App store menu
 *   * Description: Shows a menu with links to installed and available apps
 *   * Requires: apps
 */

namespace Zotlabs\Widget;


class Appstore {

	function widget($arr) {
		return replace_macros(get_markup_template('appstore.tpl'), [
			'$title' => t('App Collections'),
			'$options' => [
				[z_root() . '/apps',           t('Installed apps'), ((argc() == 1 && argv(0) === 'apps') ? 1 : 0)],
				[z_root() . '/apps/available', t('Available Apps'), ((argc() > 1 && argv(1) === 'available') ? 1 : 0)]
			]
		]);
	}
}