MDL-40404 Libraries: Deprecated get_parent_contextid()
This commit is contained in:
@@ -7230,22 +7230,6 @@ class context_block extends context {
|
||||
// before removing devs will be warned with a debugging message first,
|
||||
// then we will add error message and only after that we can remove the functions
|
||||
// completely.
|
||||
/**
|
||||
* Return the id of the parent of this context, or false if there is no parent (only happens if this
|
||||
* is the site context.)
|
||||
*
|
||||
* @deprecated since 2.2, use $context->get_parent_context() instead
|
||||
* @param context $context
|
||||
* @return integer the id of the parent context.
|
||||
*/
|
||||
function get_parent_contextid(context $context) {
|
||||
if ($parent = $context->get_parent_context()) {
|
||||
return $parent->id;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Recursive function which, given a context, find all its children context ids.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user