summaryrefslogtreecommitdiff
path: root/app/Module/IndividualSidebarModule.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2015-06-08 15:09:08 +0100
committerGreg Roach <fisharebest@gmail.com>2015-06-08 21:42:34 +0100
commit76692c8b291f16d9251d67f27078779f6737fe7e (patch)
treed92ba170d781d60d4fcff107d5a46bad5bdbce4f /app/Module/IndividualSidebarModule.php
parent238d6f46440eb68ffb982a7af1ec9dd37c8e75d7 (diff)
downloadwebtrees-76692c8b291f16d9251d67f27078779f6737fe7e.tar.gz
webtrees-76692c8b291f16d9251d67f27078779f6737fe7e.tar.bz2
webtrees-76692c8b291f16d9251d67f27078779f6737fe7e.zip
PHPDoc
Diffstat (limited to 'app/Module/IndividualSidebarModule.php')
-rw-r--r--app/Module/IndividualSidebarModule.php27
1 files changed, 21 insertions, 6 deletions
diff --git a/app/Module/IndividualSidebarModule.php b/app/Module/IndividualSidebarModule.php
index 3be6624914..fed9d40d0a 100644
--- a/app/Module/IndividualSidebarModule.php
+++ b/app/Module/IndividualSidebarModule.php
@@ -1,6 +1,4 @@
<?php
-namespace Fisharebest\Webtrees\Module;
-
/**
* webtrees: online genealogy
* Copyright (C) 2015 webtrees development team
@@ -15,6 +13,8 @@ namespace Fisharebest\Webtrees\Module;
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+namespace Fisharebest\Webtrees\Module;
+
use Fisharebest\Webtrees\Auth;
use Fisharebest\Webtrees\Database;
use Fisharebest\Webtrees\Filter;
@@ -38,9 +38,14 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
return /* I18N: Description of “Individuals” module */ I18N::translate('A sidebar showing an alphabetic list of all the individuals in the family tree.');
}
- /** {@inheritdoc} */
- public function modAction($modAction) {
- switch ($modAction) {
+ /**
+ * This is a general purpose hook, allowing modules to respond to routes
+ * of the form module.php?mod=FOO&mod_action=BAR
+ *
+ * @param string $mod_action
+ */
+ public function modAction($mod_action) {
+ switch ($mod_action) {
case 'ajax':
header('Content-Type: text/html; charset=UTF-8');
echo $this->getSidebarAjaxContent();
@@ -80,7 +85,11 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
}
}
- /** {@inheritdoc} */
+ /**
+ * Load this sidebar synchronously.
+ *
+ * @return string
+ */
public function getSidebarContent() {
global $controller, $WT_TREE;
@@ -164,6 +173,8 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
}
/**
+ * Get the initial letters of surnames.
+ *
* @param Tree $tree
* @param string $alpha
*
@@ -183,6 +194,8 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
}
/**
+ * Format a list of individuals.
+ *
* @param Tree $tree
* @param string $alpha
* @param string $surname
@@ -210,6 +223,8 @@ class IndividualSidebarModule extends AbstractModule implements ModuleSidebarInt
}
/**
+ * Search for individuals in a tree.
+ *
* @param Tree $tree Search this tree
* @param string $query Search for this text
*