aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Collections.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-15 18:31:34 -0700
committerMario Vavti <mario@mariovavti.com>2017-03-29 11:47:58 +0200
commit477ed97c2fbfff903f9ebf0ffa7fba078eeac10f (patch)
tree4f7f44aaa5d64c67f3959d196c8c55ae100c79e0 /Zotlabs/Widget/Collections.php
parent242ef70a775a86050152c0aea9096ec1cd6d0312 (diff)
downloadvolse-hubzilla-477ed97c2fbfff903f9ebf0ffa7fba078eeac10f.tar.gz
volse-hubzilla-477ed97c2fbfff903f9ebf0ffa7fba078eeac10f.tar.bz2
volse-hubzilla-477ed97c2fbfff903f9ebf0ffa7fba078eeac10f.zip
convert more widgets to classes
Diffstat (limited to 'Zotlabs/Widget/Collections.php')
-rw-r--r--Zotlabs/Widget/Collections.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/Zotlabs/Widget/Collections.php b/Zotlabs/Widget/Collections.php
new file mode 100644
index 000000000..d2b29679a
--- /dev/null
+++ b/Zotlabs/Widget/Collections.php
@@ -0,0 +1,51 @@
+<?php
+
+namespace Zotlabs\Widget;
+
+require_once('include/group.php');
+
+class Collections {
+
+ function widget($args) {
+
+ $mode = ((array_key_exists('mode',$args)) ? $args['mode'] : 'conversation');
+ switch($mode) {
+ case 'conversation':
+ $every = argv(0);
+ $each = argv(0);
+ $edit = true;
+ $current = $_REQUEST['gid'];
+ $abook_id = 0;
+ $wmode = 0;
+ break;
+ case 'connections':
+ $every = 'connections';
+ $each = 'group';
+ $edit = true;
+ $current = $_REQUEST['gid'];
+ $abook_id = 0;
+ $wmode = 0;
+ case 'groups':
+ $every = 'connections';
+ $each = argv(0);
+ $edit = false;
+ $current = intval(argv(1));
+ $abook_id = 0;
+ $wmode = 1;
+ break;
+ case 'abook':
+ $every = 'connections';
+ $each = 'group';
+ $edit = false;
+ $current = 0;
+ $abook_id = \App::$poi['abook_xchan'];
+ $wmode = 1;
+ break;
+ default:
+ return '';
+ break;
+ }
+
+ return group_side($every, $each, $edit, $current, $abook_id, $wmode);
+ }
+}