@@ -606,6 +606,10 @@ |
||
| 606 | 606 | |
| 607 | 607 | |
| 608 | 608 | /// recursively go through the nested forums to create the breadcrumb |
| 609 | +/** |
|
| 610 | + * @param integer $forum_guid |
|
| 611 | + * @param integer $recurse_forum_guid |
|
| 612 | + */ |
|
| 609 | 613 | function assemble_nested_forums($breadcrumb, $forum_guid, $recurse_forum_guid) { |
| 610 | 614 | $lang = get_current_language(); |
| 611 | 615 | $entity = get_entity($recurse_forum_guid); |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | * |
| 83 | 83 | * @param int $guid The GUID |
| 84 | 84 | * |
| 85 | - * @return \ElggUser|false |
|
| 85 | + * @return ElggEntity |
|
| 86 | 86 | */ |
| 87 | 87 | function get_user($guid) { |
| 88 | 88 | return _elgg_services()->entityTable->get($guid, 'user'); |
@@ -69,6 +69,10 @@ |
||
| 69 | 69 | return delete_data("DELETE FROM pleio_request_access WHERE id = {$this->id}"); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + /** |
|
| 73 | + * @param string $subject |
|
| 74 | + * @param string $body |
|
| 75 | + */ |
|
| 72 | 76 | private function sendEmail($subject, $body, $params = null) { |
| 73 | 77 | $site = elgg_get_site_entity(); |
| 74 | 78 | |
@@ -2,6 +2,10 @@ |
||
| 2 | 2 | namespace ModPleio; |
| 3 | 3 | |
| 4 | 4 | class Helpers { |
| 5 | + |
|
| 6 | + /** |
|
| 7 | + * @return string |
|
| 8 | + */ |
|
| 5 | 9 | public static function generateUsername($username) { |
| 6 | 10 | $hidden = access_show_hidden_entities(true); |
| 7 | 11 | |
@@ -109,6 +109,9 @@ |
||
| 109 | 109 | false |
| 110 | 110 | ); |
| 111 | 111 | |
| 112 | +/** |
|
| 113 | + * @param ElggUser $user_entity |
|
| 114 | + */ |
|
| 112 | 115 | function wires_foreach($wire_posts, $user_entity) |
| 113 | 116 | { |
| 114 | 117 | foreach ($wire_posts as $wire_post) { |
@@ -10,6 +10,12 @@ discard block |
||
| 10 | 10 | /* |
| 11 | 11 | * Packs the language variables for a single language into a single string. |
| 12 | 12 | */ |
| 13 | +/** |
|
| 14 | + * @param string|null $lwc |
|
| 15 | + * @param string|null $lwe |
|
| 16 | + * @param string|null $lop |
|
| 17 | + * @param string|null $lang |
|
| 18 | + */ |
|
| 13 | 19 | function mm_pack_language($lwc, $lwe, $lop, $lang) |
| 14 | 20 | { |
| 15 | 21 | $returner = ''; |
@@ -41,6 +47,9 @@ discard block |
||
| 41 | 47 | /* |
| 42 | 48 | * Unpacks a language string into an array of its component variable. |
| 43 | 49 | */ |
| 50 | +/** |
|
| 51 | + * @param string|null $lang |
|
| 52 | + */ |
|
| 44 | 53 | function mm_unpack_language($data_string, $lang) |
| 45 | 54 | { |
| 46 | 55 | $returner = array(); |
@@ -71,6 +80,11 @@ discard block |
||
| 71 | 80 | /* |
| 72 | 81 | * Packs the time (hour and minute) into a single string. |
| 73 | 82 | */ |
| 83 | +/** |
|
| 84 | + * @param string|null $hour |
|
| 85 | + * @param string|null $min |
|
| 86 | + * @param string|null $day |
|
| 87 | + */ |
|
| 74 | 88 | function mm_pack_time($hour, $min, $day) |
| 75 | 89 | { |
| 76 | 90 | $returner = ''; |
@@ -95,6 +109,9 @@ discard block |
||
| 95 | 109 | /* |
| 96 | 110 | * Unpacks the time into an array of hour and minute. |
| 97 | 111 | */ |
| 112 | +/** |
|
| 113 | + * @param string|null $day |
|
| 114 | + */ |
|
| 98 | 115 | function mm_unpack_time($data_string, $day) |
| 99 | 116 | { |
| 100 | 117 | $returner = array(); |
@@ -118,6 +135,9 @@ discard block |
||
| 118 | 135 | /* |
| 119 | 136 | * Unpacks every unpackable item within a given entity. |
| 120 | 137 | */ |
| 138 | +/** |
|
| 139 | + * @param ElggEntity $entity |
|
| 140 | + */ |
|
| 121 | 141 | function mm_unpack_mission($entity) |
| 122 | 142 | { |
| 123 | 143 | $returner = array(); |
@@ -429,6 +449,10 @@ discard block |
||
| 429 | 449 | * Notify user function which uses messages_send() to send on site notifications and mail() to send e-mail. |
| 430 | 450 | * This is here because notify_user() is currently not working. |
| 431 | 451 | */ |
| 452 | +/** |
|
| 453 | + * @param string $title_en |
|
| 454 | + * @param string $title_fr |
|
| 455 | + */ |
|
| 432 | 456 | function mm_notify_user($recipient, $sender, $subject, $title_en,$title_fr,$body_en, $body_fr) { |
| 433 | 457 | //notify_user($recipient, $sender, $subject, $body, array(), 'email'); |
| 434 | 458 | |
@@ -622,6 +646,9 @@ discard block |
||
| 622 | 646 | /* |
| 623 | 647 | * Returns an accept button to a user who has received an offer if the mission is not full. |
| 624 | 648 | */ |
| 649 | +/** |
|
| 650 | + * @param ElggUser|null $applicant |
|
| 651 | + */ |
|
| 625 | 652 | function mm_finalize_button($mission, $applicant) { |
| 626 | 653 | $relationship_count = elgg_get_entities_from_relationship(array( |
| 627 | 654 | 'relationship' => 'mission_accepted', |
@@ -787,6 +814,9 @@ discard block |
||
| 787 | 814 | /* |
| 788 | 815 | * Check if the user is opted in to any of the opt-in options. |
| 789 | 816 | */ |
| 817 | +/** |
|
| 818 | + * @param ElggEntity|null $current_user |
|
| 819 | + */ |
|
| 790 | 820 | function check_if_opted_in($current_user) { |
| 791 | 821 | //Nick - adding additional checks for other opportunity types |
| 792 | 822 | if($current_user->opt_in_missions == 'gcconnex_profile:opt:yes') { |
@@ -864,6 +894,9 @@ discard block |
||
| 864 | 894 | return false; |
| 865 | 895 | } |
| 866 | 896 | |
| 897 | +/** |
|
| 898 | + * @param ElggEntity $mission |
|
| 899 | + */ |
|
| 867 | 900 | function mm_complete_mission_inprogress_reports($mission, $if_no_applicants = false) { |
| 868 | 901 | if ($if_no_applicants) { |
| 869 | 902 | // Find out how many accepted applicants are on this mission. |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | * @param mixed $var Anything that does not include an object (strings, ints, arrays) |
| 49 | 49 | * This includes multi-dimensional arrays. |
| 50 | 50 | * |
| 51 | - * @return mixed The filtered result - everything will be strings |
|
| 51 | + * @return string The filtered result - everything will be strings |
|
| 52 | 52 | */ |
| 53 | 53 | function filter_tags($var) { |
| 54 | 54 | return elgg_trigger_plugin_hook('validate', 'input', null, $var); |