function assetTreeRemoveUnwantedPage(aohs\AssetOperationHandlerService $service, p\Child $child, array $params = NULL, array &$results = NULL)
{
    if ($child->getType() != a\Page::TYPE) {
        return;
    }
    $page_path = $child->getPathPath();
    // junk page names
    if (u\StringUtility::endsWith($page_path, "/pdf") || u\StringUtility::endsWith($page_path, "/word") || u\StringUtility::endsWith($page_path, "/externallink") || u\StringUtility::endsWith($page_path, "/keytiny") || u\StringUtility::endsWith($page_path, "/index-2")) {
        $service->delete($child->toStdClass());
    }
}
function assetTreeRemoveAsset(aohs\AssetOperationHandlerService $service, p\Child $child, $params = NULL, &$results = NULL)
{
    if (is_array($results) && is_array($results[c\F::REPORT_ORPHANS]) && in_array($child->getPathPath(), $results[c\F::REPORT_ORPHANS][$child->getType()])) {
        if (isset($params[c\F::REMOVE_ASSET][c\F::UNCONDITIONAL_REMOVAL]) && $params[c\F::REMOVE_ASSET][c\F::UNCONDITIONAL_REMOVAL] == true) {
            $service->delete($child->toStdClass());
        } else {
            if (!in_array($child->getId(), $params[c\F::REMOVE_ASSET][$child->getType()]) && !in_array($child->getPathPath(), $params[c\F::REMOVE_ASSET][$child->getType()])) {
                $service->delete($child->toStdClass());
            }
        }
    }
}