-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2023-05-15 AC: Adds a back end example, and modifies the user documen…
…tation.
- Loading branch information
1 parent
df9c5a3
commit f3b41a1
Showing
8 changed files
with
2,035 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* Class for circuit persistence. | ||
* | ||
* @package local_moodleorm | ||
* @copyright 2022 Andrew Caya <andrewscaya@yahoo.ca> | ||
* @author Andrew Caya | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace local_moodleorm; | ||
|
||
use \core\persistent; | ||
use \local_moodleorm\traits\unitofworkaware; | ||
|
||
/** | ||
* Class for loading/storing a circuit from the DB. | ||
* | ||
* @copyright 2022 Andrew Caya | ||
* @author Andrew Caya <andrewscaya@yahoo.ca> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class circuit extends persistent { | ||
|
||
use unitofworkaware; | ||
|
||
/** Table name */ | ||
const TABLE = 'moodleorm_circuit'; | ||
|
||
/** | ||
* Return the definition of the properties of this model. | ||
* | ||
* @return array | ||
*/ | ||
protected static function define_properties() { | ||
return array( | ||
'id' => array( | ||
'type' => PARAM_INT, | ||
), | ||
'name' => array( | ||
'type' => PARAM_TEXT, | ||
), | ||
'description' => array( | ||
'type' => PARAM_TEXT, | ||
'default' => null, | ||
'null' => NULL_ALLOWED, | ||
), | ||
'waveid' => array( | ||
'type' => PARAM_INT, | ||
), | ||
'timestart' => array( | ||
'type' => PARAM_INT, | ||
), | ||
'timeend' => array( | ||
'type' => PARAM_INT, | ||
), | ||
'timecreated' => array( | ||
'type' => PARAM_INT, | ||
'default' => time(), | ||
), | ||
'timemodified' => array( | ||
'type' => PARAM_INT, | ||
'default' => time(), | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.