public function __construct(file_browser $browser, $context, $storedfile, $urlbase, $topvisiblename, $itemidused, $readaccess, $writeaccess, $areaonly) { if ($storedfile->get_filearea() == 'gallery') { $this->gallery = new \mod_mediagallery\gallery($storedfile->get_itemid()); $topvisiblename = $this->gallery->name; } parent::__construct($browser, $context, $storedfile, $urlbase, $topvisiblename, $itemidused, $readaccess, $writeaccess, $areaonly); }
/** * Constructor * * @param file_browser $browser file browser instance * @param stdClass $context context object * @param stored_file $storedfile stored_file instance */ public function __construct($browser, $context, $storedfile) { global $CFG; $urlbase = $CFG->wwwroot . '/file.php'; parent::__construct($browser, $context, $storedfile, $urlbase, get_string('coursefiles'), false, true, true, false); }