/**
* @param ManagerInterface $auth
* @param string $name
* @param array $children
*/
private function removePermission($auth, $name, $children = array())
{
$permission = $auth->getPermission($name);
$auth->removeChildren($permission);
if ($children) {
foreach ($children as $childName => $childOptions) {
$this->removePermission($auth, $childName, isset($childOptions['children']) ? $childOptions['children'] : array());
}
}
$auth->remove($permission);
}