mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +01:00
Handle error when trying to remove a package that other packages depend on.
This commit is contained in:
@@ -522,6 +522,23 @@ class Admin
|
||||
return $dependencies;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list of packages that depend on the passed package slug
|
||||
*
|
||||
* @param string $slug The package slug
|
||||
*
|
||||
* @return array|bool
|
||||
*/
|
||||
public function getPackagesThatDependOnPackage($slug)
|
||||
{
|
||||
$gpm = $this->gpm();
|
||||
if (!$gpm) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $gpm->getPackagesThatDependOnPackage($slug);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the passed packages list can be updated
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user