diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-04 13:25:53 -0600 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-03-04 13:25:53 -0600 |
commit | 029f096411f620f2066608cd0a1e8711f88da9e1 (patch) | |
tree | c470b9a0ebccca8cc3a6d6db6e1baa30556801b0 /phpBB/includes/groupposition/interface.php | |
parent | 5695097b8a691d2c18615e59420ed383b6a34af3 (diff) | |
parent | 19c3917de985d04f994bc22bcec1e814aa2e207c (diff) | |
download | forums-029f096411f620f2066608cd0a1e8711f88da9e1.tar forums-029f096411f620f2066608cd0a1e8711f88da9e1.tar.gz forums-029f096411f620f2066608cd0a1e8711f88da9e1.tar.bz2 forums-029f096411f620f2066608cd0a1e8711f88da9e1.tar.xz forums-029f096411f620f2066608cd0a1e8711f88da9e1.zip |
Merge remote-tracking branch 'remotes/nickv/ticket/10411-2' into develop
# By Joas Schilling
# Via Joas Schilling
* remotes/nickv/ticket/10411-2: (33 commits)
[ticket/10411] Fix call to function on non-object $db->...()
[ticket/10411] Remove ajax delete, so the page is refreshed
[ticket/10411] Update schema file with new table and remove the column
[ticket/10411] Add unit tests for move() with values >1
[ticket/10411] Add migrations file for teampage table
[ticket/10411] Revert database_update.php changes from for easier update
[ticket/10411] Add maxlength to category name input field
[ticket/10411] Test for thrown exceptions when group does not exist
[ticket/10411] Catch exceptions from grouppositions
[ticket/10411] Throw exceptions instead of using trigger_error()
[ticket/10411] Add return values to add/delete function
[ticket/10411] Add return value to move functions
[ticket/10411] Fix typehinting and change private to protected
[ticket/10411] Use template loops instead of defining the html in php files
[ticket/10411] Ensure we only get services that do exist
[ticket/10411] Add a comment why we left join the group table
[ticket/10411] Rename template variable CUR_ to CURRENT_
[ticket/10411] Move globals to the top and use array for cache destroy
[ticket/10411] Use new ajax callback name row_up/row_down
[ticket/10411] Fix logic error when editing/creating a group
...
Diffstat (limited to 'phpBB/includes/groupposition/interface.php')
-rw-r--r-- | phpBB/includes/groupposition/interface.php | 84 |
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); +} |