芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/www/cepali/tag/classes/external/tag_area_exporter.php
. /** * Contains related class for displaying information of a tag area. * * @package core_tag * @copyright 2019 Juan Leyva
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace core_tag\external; defined('MOODLE_INTERNAL') || die(); use core\external\exporter; use renderer_base; /** * Contains related class for displaying information of a tag area. * * @package core_tag * @copyright 2019 Juan Leyva
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class tag_area_exporter extends exporter { /** * Return the list of properties. * * @return array */ protected static function define_properties() { return [ 'id' => [ 'type' => PARAM_INT, 'description' => 'Area id.', ], 'component' => [ 'type' => PARAM_COMPONENT, 'description' => 'Component the area is related to.', ], 'itemtype' => [ 'type' => PARAM_ALPHANUMEXT, 'description' => 'Type of item in the component.', ], 'enabled' => [ 'type' => PARAM_BOOL, 'description' => 'Whether this area is enabled.', 'default' => true, ], 'tagcollid' => [ 'type' => PARAM_INT, 'description' => 'The tag collection this are belongs to.', ], 'callback' => [ 'type' => PARAM_RAW, 'description' => 'Component callback for processing tags.', 'null' => NULL_ALLOWED, ], 'callbackfile' => [ 'type' => PARAM_RAW, 'description' => 'Component callback file.', 'null' => NULL_ALLOWED, ], 'showstandard' => [ 'type' => PARAM_INT, 'description' => 'Return whether to display only standard, only non-standard or both tags.', 'default' => 0, ], 'multiplecontexts' => [ 'type' => PARAM_BOOL, 'description' => 'Whether the tag area allows tag instances to be created in multiple contexts. ', 'default' => false, ], ]; } protected static function define_related() { return array( 'locked' => 'bool?' ); } protected static function define_other_properties() { return array( 'locked' => [ 'type' => PARAM_BOOL, 'description' => 'Whether the area is locked.', 'null' => NULL_ALLOWED, 'default' => false, 'optional' => true, ] ); } protected function get_other_values(renderer_base $output) { $values['locked'] = $this->related['locked'] ? true : false; return $values; } }