aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/groupposition/interface.php
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-03-04 13:48:29 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-03-04 13:48:29 -0600
commitc1840c78c5ea2967dfc1912665ec19ebc25c22c6 (patch)
treecd609ca105e042f3f1a91ece20acb293b30d2eef /phpBB/includes/groupposition/interface.php
parent071defded6f0e4d2a805b336f56f0a2524d5b1b6 (diff)
parenteb5075c80f9ddbec220e613a92ba37aa03a8a4f9 (diff)
downloadforums-c1840c78c5ea2967dfc1912665ec19ebc25c22c6.tar
forums-c1840c78c5ea2967dfc1912665ec19ebc25c22c6.tar.gz
forums-c1840c78c5ea2967dfc1912665ec19ebc25c22c6.tar.bz2
forums-c1840c78c5ea2967dfc1912665ec19ebc25c22c6.tar.xz
forums-c1840c78c5ea2967dfc1912665ec19ebc25c22c6.zip
Merge branch 'develop' of git://github.com/phpbb/phpbb3 into ticket/11386-3
Conflicts: phpBB/includes/db/migrator.php
Diffstat (limited to 'phpBB/includes/groupposition/interface.php')
-rw-r--r--phpBB/includes/groupposition/interface.php84
1 files changed, 84 insertions, 0 deletions
diff --git a/phpBB/includes/groupposition/interface.php b/phpBB/includes/groupposition/interface.php
new file mode 100644
index 0000000000..eacc04e1a4
--- /dev/null
+++ b/phpBB/includes/groupposition/interface.php
@@ -0,0 +1,84 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2012 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* Interface to manage group positions in various places of phpbb
+*
+* The interface provides simple methods to add, delete and move a group
+*
+* @package phpBB3
+*/
+interface phpbb_groupposition_interface
+{
+ /**
+ * Returns the value for a given group, if the group exists.
+ * @param int $group_id group_id of the group to be selected
+ * @return int position of the group
+ */
+ public function get_group_value($group_id);
+
+ /**
+ * Get number of groups displayed
+ *
+ * @return int value of the last item displayed
+ */
+ public function get_group_count();
+
+ /**
+ * Addes a group by group_id
+ *
+ * @param int $group_id group_id of the group to be added
+ * @return bool True if the group was added successfully
+ */
+ public function add_group($group_id);
+
+ /**
+ * Deletes a group by group_id
+ *
+ * @param int $group_id group_id of the group to be deleted
+ * @param bool $skip_group Skip setting the value for this group, to save the query, when you need to update it anyway.
+ * @return bool True if the group was deleted successfully
+ */
+ public function delete_group($group_id, $skip_group = false);
+
+ /**
+ * Moves a group up by group_id
+ *
+ * @param int $group_id group_id of the group to be moved
+ * @return bool True if the group was moved successfully
+ */
+ public function move_up($group_id);
+
+ /**
+ * Moves a group down by group_id
+ *
+ * @param int $group_id group_id of the group to be moved
+ * @return bool True if the group was moved successfully
+ */
+ public function move_down($group_id);
+
+ /**
+ * Moves a group up/down
+ *
+ * @param int $group_id group_id of the group to be moved
+ * @param int $delta number of steps:
+ * - positive = move up
+ * - negative = move down
+ * @return bool True if the group was moved successfully
+ */
+ public function move($group_id, $delta);
+}