Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace Flow; |
4 | |
5 | use Flow\Model\Workflow; |
6 | use MediaWiki\Status\Status; |
7 | use MediaWiki\Title\Title; |
8 | use MediaWiki\User\User; |
9 | use WikiPage; |
10 | |
11 | interface OccupationController { |
12 | /** |
13 | * @param WikiPage $wikipage |
14 | * @param Workflow $workflow |
15 | * @return Status |
16 | */ |
17 | public function ensureFlowRevision( WikiPage $wikipage, Workflow $workflow ); |
18 | |
19 | /** |
20 | * Checks whether creation is technically possible. |
21 | * |
22 | * This considers all issues other than the user. |
23 | * |
24 | * @param Title $title Title to check |
25 | * @param bool $mustNotExist Whether the page is required to not exist; true means |
26 | * it must not exist. |
27 | * @return Status Status indicating whether the creation is technically allowed |
28 | */ |
29 | public function checkIfCreationIsPossible( Title $title, $mustNotExist = true ); |
30 | |
31 | /** |
32 | * Check if user has permission to create board. |
33 | * |
34 | * @param Title $title Title to check |
35 | * @param User $user User doing creation or move |
36 | * @return Status Status indicating whether the creation is technically allowed |
37 | */ |
38 | public function checkIfUserHasPermission( Title $title, User $user ); |
39 | |
40 | /** |
41 | * Checks whether the given user is allowed to create a board at the given |
42 | * title. If so, allows it to be created. |
43 | * |
44 | * @param Title $title Title to check |
45 | * @param User $user User who wants to create a board |
46 | * @param bool $mustNotExist Whether the page is required to not exist; defaults to |
47 | * true. |
48 | * @return Status Returns successful status when the provided user has the rights to |
49 | * convert $title from whatever it is now to a flow board; otherwise, specifies |
50 | * the error. |
51 | */ |
52 | public function safeAllowCreation( Title $title, User $user, $mustNotExist = true ); |
53 | |
54 | /** |
55 | * Allows creation, *WITHOUT* checks. |
56 | * |
57 | * checkIfCreationIsPossible *MUST* be called earlier, and |
58 | * checkIfUserHasPermission *MUST* be called earlier except when permission checks |
59 | * are deliberately being bypassed (very rare cases like global rename) |
60 | * |
61 | * @param Title $title |
62 | */ |
63 | public function forceAllowCreation( Title $title ); |
64 | |
65 | /** |
66 | * Gives a user object used to manage talk pages |
67 | * |
68 | * @return User User to manage talkpages |
69 | */ |
70 | public function getTalkpageManager(); |
71 | } |