Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 234... Línea 234...
234
     * @param \context $context
234
     * @param \context $context
235
     * @return bool
235
     * @return bool
236
     * @throws \coding_exception
236
     * @throws \coding_exception
237
     * @throws \dml_exception
237
     * @throws \dml_exception
238
     */
238
     */
239
    public function can_access(filter $filter, \context $context = null): bool {
239
    public function can_access(filter $filter, ?\context $context = null): bool {
240
        return $filter->can_access($context);
240
        return $filter->can_access($context);
241
    }
241
    }
Línea 242... Línea 242...
242
 
242
 
243
    /**
243
    /**
Línea 307... Línea 307...
307
    /**
307
    /**
308
     * Provide arguments required for the toplevel page, using any provided filter.
308
     * Provide arguments required for the toplevel page, using any provided filter.
309
     * @param filter|null $filter
309
     * @param filter|null $filter
310
     * @return array
310
     * @return array
311
     */
311
     */
312
    public static function toplevel_arguments(filter $filter = null): array {
312
    public static function toplevel_arguments(?filter $filter = null): array {
313
        if ($filter !== null) {
313
        if ($filter !== null) {
314
            return ['courseid' => $filter->courseid, 'categoryid' => $filter->categoryid];
314
            return ['courseid' => $filter->courseid, 'categoryid' => $filter->categoryid];
315
        } else {
315
        } else {
316
            return [];
316
            return [];
317
        }
317
        }