diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-10-15 18:10:01 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-10-15 18:10:01 +0100 |
| commit | f3adfd50999d9a9216dbdddff470559c9995f98f (patch) | |
| tree | 9872c4689a163165df38b72c253c9a58d7bbe3b7 /library/WT/Module | |
| parent | ee36799720aea83a94dc3d1434d4d8e5621c0d4f (diff) | |
| download | webtrees-f3adfd50999d9a9216dbdddff470559c9995f98f.tar.gz webtrees-f3adfd50999d9a9216dbdddff470559c9995f98f.tar.bz2 webtrees-f3adfd50999d9a9216dbdddff470559c9995f98f.zip | |
PHPDoc
Diffstat (limited to 'library/WT/Module')
| -rw-r--r-- | library/WT/Module/Block.php | 35 | ||||
| -rw-r--r-- | library/WT/Module/Config.php | 6 | ||||
| -rw-r--r-- | library/WT/Module/Menu.php | 5 | ||||
| -rw-r--r-- | library/WT/Module/Report.php | 5 | ||||
| -rw-r--r-- | library/WT/Module/Sidebar.php | 22 | ||||
| -rw-r--r-- | library/WT/Module/Tab.php | 38 |
6 files changed, 111 insertions, 0 deletions
diff --git a/library/WT/Module/Block.php b/library/WT/Module/Block.php index 3fac4917ab..098713acb3 100644 --- a/library/WT/Module/Block.php +++ b/library/WT/Module/Block.php @@ -19,9 +19,44 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA interface WT_Module_Block { + /** + * Generate the HTML content of this block. + * + * @param int $block_id + * + * @return string + */ public function getBlock($block_id); + + /** + * Should this block load asynchronously using AJAX? + * Simple blocks are faster in-line, more comples ones + * can be loaded later. + * + * @return bool + */ public function loadAjax(); + + /** + * Can this block be shown on the user’s home page? + * + * @return bool + */ public function isUserBlock(); + + /** + * Can this block be shown on the tree’s home page? + * + * @return bool + */ public function isGedcomBlock(); + + /** + * An HTML form to edit block settings + * + * @param int $block_id + * + * @return mixed + */ public function configureBlock($block_id); } diff --git a/library/WT/Module/Config.php b/library/WT/Module/Config.php index 1eb2451ee4..b09ff6df8c 100644 --- a/library/WT/Module/Config.php +++ b/library/WT/Module/Config.php @@ -19,5 +19,11 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA interface WT_Module_Config { + /** + * The URL to a page where the user can modify the configuration of this module. + * These links are displayed in the admin page menu. + * + * @return string + */ public function getConfigLink(); } diff --git a/library/WT/Module/Menu.php b/library/WT/Module/Menu.php index 796fdd7a7e..9916a5d988 100644 --- a/library/WT/Module/Menu.php +++ b/library/WT/Module/Menu.php @@ -19,5 +19,10 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA interface WT_Module_Menu { + /** + * The user can re-order menus. Until they do, they are shown in this order. + * + * @return int + */ public function defaultMenuOrder(); } diff --git a/library/WT/Module/Report.php b/library/WT/Module/Report.php index 0318c2c438..db2f08aeaf 100644 --- a/library/WT/Module/Report.php +++ b/library/WT/Module/Report.php @@ -19,5 +19,10 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA interface WT_Module_Report { + /** + * Return a list of (usually just one) menu items. + * + * @return WT_Menu[] + */ public function getReportMenus(); } diff --git a/library/WT/Module/Sidebar.php b/library/WT/Module/Sidebar.php index 3473e0a625..35cc6614bf 100644 --- a/library/WT/Module/Sidebar.php +++ b/library/WT/Module/Sidebar.php @@ -19,8 +19,30 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA interface WT_Module_Sidebar { + /** + * The user can change the order of sidebars. Until they do this, they are shown in this order. + * + * @return int + */ public function defaultSidebarOrder(); + + /** + * Load this sidebar synchronously. + * @return string + */ public function getSidebarContent(); + + /** + * Load this sidebar asynchronously. + * + * @return string + */ public function getSidebarAjaxContent(); + + /** + * Does this sidebar have anything to display for this individual? + * + * @return bool + */ public function hasSidebarContent(); } diff --git a/library/WT/Module/Tab.php b/library/WT/Module/Tab.php index dfe44699a5..6476c09917 100644 --- a/library/WT/Module/Tab.php +++ b/library/WT/Module/Tab.php @@ -19,10 +19,48 @@ // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA interface WT_Module_Tab { + /** + * The user can re-arrange the tab order, but until they do, this + * is the order in which tabs are shown. + * + * @return int + */ public function defaultTabOrder(); + + /** + * Generate the HTML content of this tab. + * + * @return string + */ public function getTabContent(); + + /** + * Is this tab empty? If so, we don't always need to display it. + * @return bool + */ public function hasTabContent(); + + /** + * Can this tab load asynchronously? + * + * @return bool + */ public function canLoadAjax(); + + /** + * Any content (e.g. Javascript) that needs to be rendered before the tabs. + * + * This function is probably not needed, as there are better ways to achieve this. + * + * @return string + */ public function getPreLoadContent(); + + /** + * A greyed out tab has no actual content, but may perhaps have + * options to create content. + * + * @return bool + */ public function isGrayedOut(); } |
