interface groupposition_interface

Interface to manage group positions in various places of phpbb

The interface provides simple methods to add, delete and move a group

Methods

int
get_group_value(int $group_id)

Returns the value for a given group, if the group exists.

int
get_group_count()

Get number of groups displayed

bool
add_group(int $group_id)

Addes a group by group_id

bool
delete_group(int $group_id, bool $skip_group = false)

Deletes a group by group_id

bool
move_up(int $group_id)

Moves a group up by group_id

bool
move_down(int $group_id)

Moves a group down by group_id

bool
move(int $group_id, int $delta)

Moves a group up/down

Details

at line 28
int get_group_value(int $group_id)

Returns the value for a given group, if the group exists.

Parameters

int $group_id

group_id of the group to be selected

Return Value

int

position of the group

at line 35
int get_group_count()

Get number of groups displayed

Return Value

int

value of the last item displayed

at line 43
bool add_group(int $group_id)

Addes a group by group_id

Parameters

int $group_id

group_id of the group to be added

Return Value

bool

True if the group was added successfully

at line 52
bool delete_group(int $group_id, bool $skip_group = false)

Deletes a group by group_id

Parameters

int $group_id

group_id of the group to be deleted

bool $skip_group

Skip setting the value for this group, to save the query, when you need to update it anyway.

Return Value

bool

True if the group was deleted successfully

at line 60
bool move_up(int $group_id)

Moves a group up by group_id

Parameters

int $group_id

group_id of the group to be moved

Return Value

bool

True if the group was moved successfully

at line 68
bool move_down(int $group_id)

Moves a group down by group_id

Parameters

int $group_id

group_id of the group to be moved

Return Value

bool

True if the group was moved successfully

at line 79
bool move(int $group_id, int $delta)

Moves a group up/down

Parameters

int $group_id

group_id of the group to be moved

int $delta

number of steps:

  • positive = move up
  • negative = move down

Return Value

bool

True if the group was moved successfully