/*
getBlackListedPageTypes optionally configured by the developer
Includes blacklisted page types defined in the old exclude_from_page_types array
18237
public function getBlackListedPageTypes()
	{
		$config = $this->config()->get('options');
		$legacy = isset($config['exclude_from_page_types']) ? $config['exclude_from_page_types'] : [];
		$current = isset($config['pagetype_blacklist']) ? $config['pagetype_blacklist'] : [];
		return array_merge($legacy, $current);
	}
162841
def get_black(self):
        """"""
        blacklist = []
        for read in self.black_conf.splitlines():
            read = read.lstrip()
            if not read.startswith("#"):
                blacklist.append(read.replace("\n", ""))
        return blacklist
249239
protected function getBlacklistedExtensions()
    {
        $block = config('cms-upload-module.upload.restrict.extensions.block', null);

        if ( ! is_array($block) || ! count($block)) {
            return false;
        }

        return array_map('trim', array_map('strtolower', $block));
    }
189389
public String [] getParamTypeDescriptors() {
        return methodType().parameterList().stream()
                .map(BSHType::getTypeDescriptor).toArray(String[]::new);
    }
1117902
protected function getBlacklistedMimeTypes()
    {
        $block = config('cms-upload-module.upload.restrict.mimetypes.block', null);

        if ( ! is_array($block) || ! count($block)) {
            return false;
        }

        return array_map('trim', array_map('strtolower', $block));
    }
20192
public java.util.Map<String, java.util.List<BlacklistEntry>> getBlacklistReport() {
        return blacklistReport;
    }
1123655
private boolean inBlackList(String className) {
        for (String prefix : blackPrefixList) {
            if (className.startsWith(prefix)) {
                return Boolean.TRUE;
            }
        }
        return Boolean.FALSE;
    }
292295
@SuppressWarnings("unchecked")
	protected List<? extends Class<? extends WebPage>> getAllPageClassesQuietly()
	{
		final List<Class<? extends WebPage>> pages = new ArrayList<>();
		try
		{
			final Set<Class<?>> set = AnnotationExtensions.getAllAnnotatedClasses(getPackageName(),
				MountPath.class);
			for (final Class<?> class1 : set)
			{
				pages.add((Class<? extends WebPage>)class1);
			}
		}
		catch (final ClassCastException e)
		{
			LOGGER.error(
				e.getClass().getName() + " occured while scanning for MountPath annotations.", e);
		}
		catch (final ClassNotFoundException e)
		{
			LOGGER.error(
				e.getClass().getName() + " occured while scanning for MountPath annotations.", e);
		}
		catch (final IOException e)
		{
			LOGGER.error(
				e.getClass().getName() + " occured while scanning for MountPath annotations.", e);
		} catch (URISyntaxException e) {
			LOGGER.error(
					e.getClass().getName() + " occured while scanning for MountPath annotations.", e);
		}
		return pages;
	}
401943
public static function deletePageTypes($page_id = null)
    {
        if (is_null($page_id)) {
            return false;
        }

        return Symphony::Database()->delete('tbl_pages_types', sprintf(" `page_id` = %d ", $page_id));
    }
642990
protected function getPageTypes()
    {
        $pageTypes = array();
        foreach (SiteTree::page_type_classes() as $pageTypeClass) {
            $pageTypes[$pageTypeClass] = SiteTree::singleton($pageTypeClass)->i18n_singular_name();
        }
        asort($pageTypes);
        return $pageTypes;
    }
701984
public static function page_type_classes()
    {
        $classes = ClassInfo::getValidSubClasses();

        $baseClassIndex = array_search(self::class, $classes);
        if ($baseClassIndex !== false) {
            unset($classes[$baseClassIndex]);
        }

        $kill_ancestors = array();

        // figure out if there are any classes we don't want to appear
        foreach ($classes as $class) {
            $instance = singleton($class);

            // do any of the progeny want to hide an ancestor?
            if ($ancestor_to_hide = $instance->config()->get('hide_ancestor')) {
                // note for killing later
                $kill_ancestors[] = $ancestor_to_hide;
            }
        }

        // If any of the descendents don't want any of the elders to show up, cruelly render the elders surplus to
        // requirements
        if ($kill_ancestors) {
            $kill_ancestors = array_unique($kill_ancestors);
            foreach ($kill_ancestors as $mark) {
                // unset from $classes
                $idx = array_search($mark, $classes, true);
                if ($idx !== false) {
                    unset($classes[$idx]);
                }
            }
        }

        return $classes;
    }
256048
public String[] getProxyHostsBlackList()
    {
        if (_proxyHostsBlackList == null || _proxyHostsBlackList.size() == 0)
            return new String[0];

        String[] hosts = new String[_proxyHostsBlackList.size()];
        hosts = (String[]) _proxyHostsBlackList.toArray(hosts);
        return hosts;
    }
1187228
public function getBlacklistFilter()
    {
        $blacklist = $this->getBlacklist();

        return function (SplFileInfo $file) use ($blacklist) {
            return in_array($file->getPathname(), $blacklist) ? false : null;
        };
    }
1221596
@Override
  public @NotNull Set<String> getAllowedComponents(@NotNull String resourcePath, @NotNull ResourceResolver resolver) {
    PageManager pageManager = AdaptTo.notNull(resolver, PageManager.class);
    Page page = pageManager.getContainingPage(resourcePath);
    if (page == null && StringUtils.contains(resourcePath, "/" + JcrConstants.JCR_CONTENT)) {
      // if resource does not exist (e.g. inherited parsys) get page from resource path manually
      page = pageManager.getPage(StringUtils.substringBefore(resourcePath, "/" + JcrConstants.JCR_CONTENT));
    }
    if (page == null) {
      return ImmutableSet.of();
    }
    String relativePath = StringUtils.substringAfter(resourcePath, page.getPath() + "/");
    return getAllowedComponents(page, relativePath, null, resolver);
  }
262824
public function getAllPagetypes()
    {
        $path = config('page.paths.pagetypes');

        $pagetypes = collect();

        // Loop though all files in path and manually instantiate classes.
        foreach (glob($path.'/*.php') as $filename) {
            $fullClassName = self::getFullNamespace($filename).'\\'.self::getClassName($filename);
            $pagetypes[] = new $fullClassName;
        }

        return $pagetypes;
    }
897919
function logBlacklistError(err) {
  log.error(ansi.red('Error: failed to retrieve plugins black-list'));
  log.error(err.message); // Avoid duplicating for each version
  exit(1);
}
980340
public static int getContainerPageTypeIdSafely() {

        try {
            return getContainerPageTypeId();
        } catch (CmsLoaderException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug(e.getLocalizedMessage(), e);
            }
            return -1;
        }
    }