From d043d3c46587350173bebc8f44f7b260d9f7fe73 Mon Sep 17 00:00:00 2001 From: PMKuipers Date: Sun, 27 Aug 2023 08:53:37 +0200 Subject: [PATCH] PHP doc --- block_mytreestudyplan.php | 24 ++++++++++++++++++++++-- build.php | 2 +- db/access.php | 2 +- lang/en/block_mytreestudyplan.php | 2 +- lang/nl/block_mytreestudyplan.php | 2 +- lib.php | 2 +- settings.php | 2 +- version.php | 2 +- 8 files changed, 29 insertions(+), 9 deletions(-) diff --git a/block_mytreestudyplan.php b/block_mytreestudyplan.php index 4a3e43f..b958e26 100644 --- a/block_mytreestudyplan.php +++ b/block_mytreestudyplan.php @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** + * Main block code * * @package block_mytreestudyplan * @copyright 2023 P.M. Kuipers @@ -22,13 +23,20 @@ use local_treestudyplan\studyplan; +/** + * MyTreestudyplan block base code + */ class block_mytreestudyplan extends \block_base { - public $levelset; - + /** + * Plugin initialization (before $this->config and $this->page are loaded) + */ public function init() { } + /** + * Plugin specialization (directly called after $this->config and $this->page are ready) + */ public function specialization() { global $CFG; $this->title = get_string('title', 'block_mytreestudyplan'); @@ -51,6 +59,9 @@ class block_mytreestudyplan extends \block_base { } } + /** + * Publish the pages this block can be shown on + */ public function applicable_formats() { // Limit this block to the site index and the dashboard (my) pages. return [ @@ -62,6 +73,9 @@ class block_mytreestudyplan extends \block_base { ]; } + /** + * Render block content + */ public function get_content() { global $CFG; global $USER; @@ -98,10 +112,16 @@ class block_mytreestudyplan extends \block_base { return $this->content; } + /** + * Whether to hide the header or not + */ public function hide_header() { return false; } + /** + * Whether this block has config or not + */ public function has_config() { return false; } diff --git a/build.php b/build.php index e83604c..4d033ac 100644 --- a/build.php +++ b/build.php @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** - * + * Build script to properly create a distribution zip * @package block_mytreestudyplan * @copyright 2023 P.M. Kuipers * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/db/access.php b/db/access.php index 7bc4266..2cd8c8a 100644 --- a/db/access.php +++ b/db/access.php @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** - * + * Permission descriptions * @package block_mytreestudyplan * @copyright 2023 P.M. Kuipers * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/lang/en/block_mytreestudyplan.php b/lang/en/block_mytreestudyplan.php index f16d122..c69828a 100644 --- a/lang/en/block_mytreestudyplan.php +++ b/lang/en/block_mytreestudyplan.php @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** - * + * English language file * @package block_mytreestudyplan * @copyright 2023 P.M. Kuipers * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/lang/nl/block_mytreestudyplan.php b/lang/nl/block_mytreestudyplan.php index 83bf69a..4328e7c 100644 --- a/lang/nl/block_mytreestudyplan.php +++ b/lang/nl/block_mytreestudyplan.php @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** - * + * Dutch language file * @package block_mytreestudyplan * @copyright 2023 P.M. Kuipers * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/lib.php b/lib.php index 7a8c719..b35e30c 100644 --- a/lib.php +++ b/lib.php @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** - * + * Library page * @package block_mytreestudyplan * @copyright 2023 P.M. Kuipers * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/settings.php b/settings.php index 7a8c719..e4823a1 100644 --- a/settings.php +++ b/settings.php @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** - * + * Settings page * @package block_mytreestudyplan * @copyright 2023 P.M. Kuipers * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later diff --git a/version.php b/version.php index bbf0ca1..fb614cd 100644 --- a/version.php +++ b/version.php @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . /** - * + * Version description * @package block_mytreestudyplan * @copyright 2023 P.M. Kuipers * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later