aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget/Collections.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-15 18:31:34 -0700
committerzotlabs <mike@macgirvin.com>2017-03-15 18:31:34 -0700
commit9cb9608209ab5f9fb123acc82a563ba54c450db1 (patch)
treecac1d07e7d04498ed2a555b3d8c3e89cd51b2634 /Zotlabs/Widget/Collections.php
parentb20062efa6052e29b8d2d2a42ca966837db1c29f (diff)
downloadvolse-hubzilla-9cb9608209ab5f9fb123acc82a563ba54c450db1.tar.gz
volse-hubzilla-9cb9608209ab5f9fb123acc82a563ba54c450db1.tar.bz2
volse-hubzilla-9cb9608209ab5f9fb123acc82a563ba54c450db1.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);
+ }
+}