Check if the current page is a Mocabonita page

@return bool
19564
protected function isMocabonitaPage()
    {
        if (is_null($this->page)) {
            $this->getMbRequest()->setMocaBonitaPage(false);

            return false;
        }

        if (is_null($this->getMbRequest()->isMocaBonitaPage())) {
            $this->getMbRequest()->setMocaBonitaPage($this->mbPages->has($this->page));
        }

        return $this->getMbRequest()->isMocaBonitaPage();
    }
875028
public function isExempt()
    {
        /*
         * This would grab the exempted routes from the maintenance.php config file
         *
         * An example of this file:
         * return [
         *   'exemptions' => [
         *     'user-groups' => [ 1, 2, 3 ],
         *   ],
         * ];
         */

        $exemptGroups = $this->app['config']->get('maintenancemode.exemptions.user-groups', []);
        $currentUser = $this->app['auth']->user();
        if(is_array($exemptGroups) && $currentUser !== null)
        {
            // Grab the current user group IDs
            $currentUserGroups = $currentUser->groups->modelKeys();

            // Check to see if the user is within this group
            if((is_array($currentUserGroups) && count(array_intersect($currentUserGroups, $exemptGroups))) ||
                !is_array($currentUserGroups) && in_array($currentUserGroups, $exemptGroups))
            {
                // The user matched the whitelist, they will NOT see the maintenance page
                return true;
            }
        }

        // The current user did not match the whitelist, therefore they MIGHT see the maintenance page (depending on other exemptions)
        return false;
    }
237244
public function isAnchorMode()
    {
        foreach ($this->tabs as $tab) {
            if (!empty($tab->getAnchor())) {
                return true;
            }
        }

        return false;
    }
351839
public function checkPageSubjectInUrl() {
        if ($this->checkPageSubjectDefined()) {

            $url_segment             = $this->owner->URLSegment;
            $pagesubject_url_segment = $this->owner->generateURLSegment($this->owner->SEOPageSubject);

            if (preg_match('/' . preg_quote($pagesubject_url_segment, '/') . '/i', $url_segment)) {
                return true;
            }
            else {
                return false;
            }
        }
        return false;

    }
1030076
private function isCurrentlyLastPage()
    {
        if ($this->page_number_type === 'start_num') {
            if ($this->page_number_value >= ($this->total_pages*$this->items_per_page)-$this->items_per_page) {
                return true;
            }
            return false;
        } elseif ($this->page_number_type === 'page_num') {
            if ($this->page_number_value >= $this->total_pages) {
                return true;
            }
            return false;
        }
        return false;
    }
537124
public static function checkBrowserIceCat()
    {
        if (stripos(self::$userAgentString, 'Mozilla') !== false &&
            preg_match('/IceCat\/([^ ]*)/i', self::$userAgentString, $matches)
        ) {
            if (isset($matches[1])) {
                self::$browser->setVersion($matches[1]);
            }
            self::$browser->setName(Browser::ICECAT);

            return true;
        }

        return false;
    }
874403
protected function checkBrowserSongbird() {
	    if( stripos($this->_agent,'Songbird') !== false ) {
		    $aversion = explode('/',stristr($this->_agent,'Songbird'));
		    $this->setVersion($aversion[1]);
		    $this->setBrowser(self::BROWSER_SONGBIRD);
			return true;
	    }
	    return false;
    }
796636
public function isEditMode()
    {
        if ($this->getCollectionPath() == STACKS_LISTING_PAGE_PATH) {
            return true;
        }
        if ($this->getPageTypeHandle() == STACKS_PAGE_TYPE) {
            return true;
        }

        return $this->isCheckedOutByMe();
    }
588336
public function accept()
    {
        $accepted = (bool) $this->isAccepted();
        if ($accepted === false && $this->current() instanceof PageInterface) {
            $parent = $this->current()->getParent();
            if (!empty($parent)) {
                $parent->removePage($this->current());
            }
        }

        return $accepted;
    }
856052
public function isTabbed()
    {
        $ident    = $this->ident();
        $metadata = $this->adminSecondaryMenu();

        if (isset($metadata[$ident])) {
            return $this->hasLinks() ||
                   $this->hasGroups() ||
                   $this->hasActions();
        }

        return false;
    }
1092896
public function hasPage(...$args): bool
    {
        if (!count($args)) {
            return $this->exists('page');
        }

        return $this->exists('page', ...$args);
    }
553342
public function hasTabs(): bool
    {
        if ( ! $this->layout || ! count($this->layout)) {
            return false;
        }

        foreach ($this->layout as $key => $value) {

            if ($value instanceof ModelFormTabDataInterface) {
                return true;
            }
        }

        return false;
    }
232108
protected function get_lastpage() {
        $pages = $this->load_all_pages();
        if (count($pages) > 0) {
            foreach ($pages as $page) {
                if ((int)$page->nextpageid === 0) {
                    return $page;
                }
            }
        }
        return false;
    }
306196
final public function inMiddle () : bool
    {
        return ($this->lastPage() - ($this->adjacent * 2) > $this->currentPage && $this->currentPage > ($this->adjacent * 2)) ? TRUE : FALSE;
    }
627107
private function isCurrentlyFirstPage()
    {
        if ($this->page_number_type === 'start_num') {
            if ($this->page_number_value === 0) {
                return true;
            }
            return false;
        } elseif ($this->page_number_type === 'page_num') {
            if ($this->page_number_value === 1) {
                return true;
            }
            return false;
        }
        return false;
    }
1071768
public function checkPageSubjectInImageAltTags() {

        $html = $this->getPageContent();

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

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

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

        foreach($images as $image){
            if($image->hasAttribute('alt') && $image->getAttribute('alt') != ''){
                if (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $image->getAttribute('alt'))) {
                    return true;
                }
            }
        }

        return false;
    }
135935
public function currentPage()
    {
        $currentRoute = $this->router->getCurrentRoute();

        if (! $currentRoute) {
            return 1;
        }

        $query = $currentRoute->parameter('pageQuery');

        return (int) str_replace($this->pageKeyword.'/', '', $query) ?: 1;
    }