@@ -14,6 +14,10 @@ |
||
14 | 14 | */ |
15 | 15 | protected $group; |
16 | 16 | |
17 | + /** |
|
18 | + * @param SecurityAdmin $controller |
|
19 | + * @param string $name |
|
20 | + */ |
|
17 | 21 | public function __construct($controller, $name, $fields = null, $actions = null, $validator = null) { |
18 | 22 | if(!$fields) { |
19 | 23 | $helpHtml = _t( |
@@ -117,6 +117,9 @@ |
||
117 | 117 | Requirements::javascript(FRAMEWORK_ADMIN_DIR . '/client/dist/js/ModelAdmin.js'); |
118 | 118 | } |
119 | 119 | |
120 | + /** |
|
121 | + * @param string $action |
|
122 | + */ |
|
120 | 123 | public function Link($action = null) { |
121 | 124 | if(!$action) $action = $this->sanitiseClassName($this->modelClass); |
122 | 125 | return parent::Link($action); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * left. |
100 | 100 | * @param array $attributes an array of attributes to include on the link. |
101 | 101 | * |
102 | - * @return boolean The result of the operation. |
|
102 | + * @return boolean|null The result of the operation. |
|
103 | 103 | */ |
104 | 104 | public static function add_link($code, $menuTitle, $url, $priority = -1, $attributes = null) { |
105 | 105 | return self::add_menu_item($code, $menuTitle, $url, null, $priority, $attributes); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * have the rights to access some other part of the admin area. |
120 | 120 | * @param int $priority |
121 | 121 | * @param array $attributes an array of attributes to include on the link. |
122 | - * @return bool Success |
|
122 | + * @return boolean|null Success |
|
123 | 123 | */ |
124 | 124 | public static function add_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1, |
125 | 125 | $attributes = null) { |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | * have the rights to access some other part of the admin area. |
251 | 251 | * @param int $priority |
252 | 252 | * @param array $attributes an array of attributes to include on the link. |
253 | - * @return bool Success |
|
253 | + * @return boolean|null Success |
|
254 | 254 | */ |
255 | 255 | public static function replace_menu_item($code, $menuTitle, $url, $controllerClass = null, $priority = -1, |
256 | 256 | $attributes = null) { |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | /** |
253 | 253 | * Gets the combined configuration of all LeafAndMain subclasses required by the client app. |
254 | 254 | * |
255 | - * @return array |
|
255 | + * @return string |
|
256 | 256 | * |
257 | 257 | * WARNING: Experimental API |
258 | 258 | */ |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | * |
692 | 692 | * @param string $url |
693 | 693 | * @param int $code |
694 | - * @return HTTPResponse|string |
|
694 | + * @return string|null |
|
695 | 695 | */ |
696 | 696 | public function redirect($url, $code=302) { |
697 | 697 | if($this->getRequest()->isAjax()) { |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | * {@link SSViewer::get_templates_by_class()} |
970 | 970 | * |
971 | 971 | * @param string $suffix |
972 | - * @return array |
|
972 | + * @return string |
|
973 | 973 | */ |
974 | 974 | public function getTemplatesWithSuffix($suffix) { |
975 | 975 | $templates = SSViewer::get_templates_by_class(get_class($this), $suffix, __CLASS__); |
@@ -2039,7 +2039,7 @@ discard block |
||
2039 | 2039 | } |
2040 | 2040 | |
2041 | 2041 | /** |
2042 | - * @return String |
|
2042 | + * @return DBField |
|
2043 | 2043 | */ |
2044 | 2044 | public function Locale() { |
2045 | 2045 | return DBField::create_field('Locale', i18n::get_locale()); |
@@ -23,6 +23,10 @@ discard block |
||
23 | 23 | */ |
24 | 24 | protected $group; |
25 | 25 | |
26 | + /** |
|
27 | + * @param SecurityAdmin $controller |
|
28 | + * @param string $name |
|
29 | + */ |
|
26 | 30 | public function __construct($controller, $name, $fields = null, $actions = null, $validator = null) { |
27 | 31 | if(!$fields) { |
28 | 32 | $helpHtml = _t( |
@@ -109,7 +113,7 @@ discard block |
||
109 | 113 | } |
110 | 114 | |
111 | 115 | /** |
112 | - * @param $group Group |
|
116 | + * @param Group $group Group |
|
113 | 117 | */ |
114 | 118 | public function setGroup($group) { |
115 | 119 | $this->group = $group; |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | /** |
252 | 252 | * @see SecurityAdmin_MemberImportForm |
253 | 253 | * |
254 | - * @return Form |
|
254 | + * @return null|MemberImportForm |
|
255 | 255 | */ |
256 | 256 | public function MemberImportForm() { |
257 | 257 | if(!Permission::check('ADMIN')) { |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | * @see SecurityAdmin_MemberImportForm |
287 | 287 | * |
288 | 288 | * @skipUpgrade |
289 | - * @return Form |
|
289 | + * @return null|GroupImportForm |
|
290 | 290 | */ |
291 | 291 | public function GroupImportForm() { |
292 | 292 | if(!Permission::check('ADMIN')) { |
@@ -36,6 +36,7 @@ |
||
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Get Mink session from MinkContext |
39 | + * @return \Behat\Mink\Session |
|
39 | 40 | */ |
40 | 41 | public function getSession($name = null) { |
41 | 42 | return $this->getMainContext()->getSession($name); |
@@ -97,6 +97,9 @@ |
||
97 | 97 | return $return; |
98 | 98 | } |
99 | 99 | |
100 | + /** |
|
101 | + * @param boolean $index |
|
102 | + */ |
|
100 | 103 | function f($index) { |
101 | 104 | return stripslashes($this->row[$index]); |
102 | 105 | } |
@@ -61,9 +61,17 @@ discard block |
||
61 | 61 | return $path; |
62 | 62 | } |
63 | 63 | |
64 | + /** |
|
65 | + * @param integer $parent |
|
66 | + * @param integer $position |
|
67 | + */ |
|
64 | 68 | function _create($parent, $position) { |
65 | 69 | return $this->_move(0, $parent, $position); |
66 | 70 | } |
71 | + |
|
72 | + /** |
|
73 | + * @param integer $id |
|
74 | + */ |
|
67 | 75 | function _remove($id) { |
68 | 76 | if((int)$id === 1) { return false; } |
69 | 77 | $data = $this->_get_node($id); |
@@ -100,6 +108,10 @@ discard block |
||
100 | 108 | ); |
101 | 109 | return true; |
102 | 110 | } |
111 | + |
|
112 | + /** |
|
113 | + * @param integer $id |
|
114 | + */ |
|
103 | 115 | function _move($id, $ref_id, $position = 0, $is_copy = false) { |
104 | 116 | if((int)$ref_id === 0 || (int)$id === 1) { return false; } |
105 | 117 | $sql = array(); // Queries executed at the end |
@@ -238,6 +250,10 @@ discard block |
||
238 | 250 | if($is_copy) $this->_fix_copy($ind, $position); |
239 | 251 | return $node === false || $is_copy ? $ind : true; |
240 | 252 | } |
253 | + |
|
254 | + /** |
|
255 | + * @param integer $position |
|
256 | + */ |
|
241 | 257 | function _fix_copy($id, $position) { |
242 | 258 | $node = $this->_get_node($id); |
243 | 259 | $children = $this->_get_children($id, true); |