Check if the Blocks CMSFields should be displayed for this Page

@return boolean
499862
public function showBlocksFields()
	{
		$whiteList = $this->blockManager->getWhiteListedPageTypes();
		$blackList = $this->blockManager->getBlackListedPageTypes();

		if (in_array($this->owner->ClassName, $blackList)) {
			return false;
		}

		if (count($whiteList) && !in_array($this->owner->ClassName, $whiteList)) {
			return false;
		}

		if (!Permission::check('BLOCK_EDIT')) {
			return false;
		}

		return true;
	}
160820
public static function isRefererOnBlocklist()
    {
        $referer = self::getHttpReferer();
        if ($referer === null) {
            self::$reason = 'Not blocking because referer header is not set or empty';

            return false;
        }

        return self::isUrlOnBlocklist($referer, 'referer');
    }
685328
public function displayBreadcrumbs()
    {
        if (!Framework::instance()->getThemeOption('display_breadcrumbs')) {
            return false;
        }

        if (!is_front_page() && !(is_home() && 'page' !== get_option('show_on_front'))) {
            return true;
        }

        return false;
    }
776697
public function is_block_present($blockname) {
        if (empty($this->blockinstances)) {
            return false;
        }

        $requiredbythemeblocks = $this->get_required_by_theme_block_types();
        foreach ($this->blockinstances as $region) {
            foreach ($region as $instance) {
                if (empty($instance->instance->blockname)) {
                    continue;
                }
                if ($instance->instance->blockname == $blockname) {
                    if ($instance->instance->requiredbytheme) {
                        if (!in_array($blockname, $requiredbythemeblocks)) {
                            continue;
                        }
                    }
                    return true;
                }
            }
        }
        return false;
    }
393353
public static function display_blocking_page() {
        global $PERF;

        $page = self::get_locked_page_at($PERF->sessionlock['start']);
        $output = "Script ".me()." was blocked for ";
        $output .= number_format($PERF->sessionlock['wait'], 3);
        if ($page != null) {
            $output .= " second(s) by script: ";
            $output .= $page['url'];
        } else {
            $output .= " second(s) by an unknown script.";
        }

        return $output;
    }
1300676
private function has_add_block_capability($page, $capability) {
        // Check if the capability exists.
        if (!get_capability_info($capability)) {
            // Debug warning that the capability does not exist, but no more than once per page.
            static $warned = array();
            if (!isset($warned[$this->name()])) {
                debugging('The block ' .$this->name() . ' does not define the standard capability ' .
                        $capability , DEBUG_DEVELOPER);
                $warned[$this->name()] = 1;
            }
            // If the capability does not exist, the block can always be added.
            return true;
        } else {
            return has_capability($capability, $page->context);
        }
    }
257610
public function is_auto_width()
    {
        $style = $this->_style;

        return in_array(
            "auto",
            array(
                $style->width,
                $style->margin_left,
                $style->margin_right,
                $style->border_left_width,
                $style->border_right_width,
                $style->padding_left,
                $style->padding_right,
                $this->_containing_block["w"]
            ),
            true
        );
    }
1298004
protected function checkRequiredFields()
    {
        if (empty($this->toAddresses)) {
            return false;
        }
        if (empty($this->subject)) {
            return false;
        }

        if (empty($this->plainMessage) && empty($this->htmlMessage) && empty($this->attachments)) {
            return false;
        }

        return true;
    }
597320
public function isEditable()
    {
        $bv = new BlockView($this);
        $path = $bv->getBlockPath(FILENAME_BLOCK_EDIT);
        if (file_exists($path . '/' . FILENAME_BLOCK_EDIT)) {
            return true;
        }

        return false;
    }
1133645
private function checkImageTitleTags() {

        $html = $this->getPageContent();

        // for newly created page
        if ($html == '') {
            return false;
        }

        $dom = $this->createDOMDocumentFromHTML($html);

        $images = $dom->getElementsByTagName('img');

        $imagesWithTitleTags = 0;
        foreach($images as $image){
            if($image->hasAttribute('title') && $image->getAttribute('title') != ''){
                //echo $image->getAttribute('title') . '<br>';
                $imagesWithTitleTags++;
            }
        }

        if($imagesWithTitleTags == $images->length){
            return true;
        }

        return false;
    }
599817
private static function __isPageFront() {
		$params = Router::getParams();

		return (
			!empty($params['controller']) && 'pages' == $params['controller']
			&& !empty($params['action']) && 'display' == $params['action']
			&& !empty($params['pass']) && in_array('home', (array) $params['pass'])
		);
	}
245785
protected function checkBlocked()
    {
        if ($this->user->status_id === Status::BLOCKED) {
            return $this->addAction('Un-Block', 'unlock', $this->makeRoute('block', 0));
        }

        return $this->addAction('Block', 'lock', $this->makeRoute('block', 1));
    }
854103
public function hasRoutableTemplates()
    {
        $this->buildTemplateIndex();

        $routable = false;

        foreach ($this->templateIndex as $name => $template) {
            if (($name !== self::INDEX_TEMPLATE) && ($name !== self::NOTFOUND_TEMPLATE)) {
                $routable = true;
                break;
            }
        }

        return($routable);
    }
115419
public function canShowBlock()
    {
        $canShowBlock = parent::canShowBlock();

        if ($this->moduleManager->isEnabled('Magento_Staging')) {
            try {
                $versionManager = $this->objectManager->get('\Magento\Staging\Model\VersionManager');

                $canShowBlock = $canShowBlock && !$versionManager->isPreviewVersion();
            } catch (\Exception $exception) {
                ;
            }
        }

        if ($this->getLayer() instanceof \Magento\Catalog\Model\Layer\Category &&
            $this->getLayer()->getCurrentCategory()->getDisplayMode() === \Magento\Catalog\Model\Category::DM_PAGE) {
            $canShowBlock = false;
        }

        return $canShowBlock;
    }
991010
public function shouldDisplay(): bool
    {
        if ($this->before || $this->after) {
            return true;
        }

        return (bool) count($this->children);
    }
999060
public function shouldCmsRegister()
    {
        if (null !== $this->shouldRegister) {
            // @codeCoverageIgnoreStart
            return $this->shouldRegister;
            // @codeCoverageIgnoreEnd
        }

        if ( ! $this->isCmsEnabled()) {
            $this->shouldRegister = false;
            return false;
        }

        if ($this->isConsole()) {
            $this->shouldRegister = $this->isCmsEnabledArtisanCommand();
            return $this->shouldRegister;
        }

        if ($this->isCmsBeingUnitTested()) {
            $this->shouldRegister = true;
            return true;
        }

        $this->shouldRegister = $this->isCmsWebRequest() || $this->isCmsApiRequest();
        return $this->shouldRegister;
    }
443969
public function isAllowedCurrentPage()
    {
        if (!$this->isActive()) {
            return false;
        }

        $this->_initAllowedPages();
        
        if (!$this->getCurrentPage()) {
            return false;
        }
        
        return isset($this->_allowedPages[$this->getCurrentPage()]);
    }