Checks if preview mode is ON

@return bool
506451
public function canPreview()
    {
        $blCan = null;
        if (($sPrevId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('preview')) &&
            ($sAdminSid = \OxidEsales\Eshop\Core\Registry::getUtilsServer()->getOxCookie('admin_sid'))
        ) {
            $sTable = getViewName('oxuser');
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $sQ = "select 1 from $sTable where MD5( CONCAT( " . $oDb->quote($sAdminSid) . ", {$sTable}.oxid, {$sTable}.oxpassword, {$sTable}.oxrights ) ) = " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sPrevId);
            $blCan = (bool) $oDb->getOne($sQ);
        }

        return $blCan;
    }
1139213
def has_color(self):
        """"""
        if (self.get_value(CONST.STATUSES_KEY).get('color_mode')
                == str(CONST.COLOR_MODE_ON)):
            return True
        return False
489486
public function isVisible()
    {
        // admin preview mode
        if (($blCanPreview = \OxidEsales\Eshop\Core\Registry::getUtils()->canPreview()) !== null) {
            return $blCanPreview;
        }

        // active ?
        $sNow = date('Y-m-d H:i:s');
        if (!$this->oxarticles__oxactive->value &&
            ($this->oxarticles__oxactivefrom->value > $sNow ||
             $this->oxarticles__oxactiveto->value < $sNow
            )
        ) {
            return false;
        }

        // stock flags
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blUseStock') && $this->oxarticles__oxstockflag->value == 2) {
            $iOnStock = $this->oxarticles__oxstock->value + $this->oxarticles__oxvarstock->value;
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('blPsBasketReservationEnabled')) {
                $iOnStock += $this->getSession()->getBasketReservations()->getReservedAmount($this->getId());
            }
            if ($iOnStock <= 0) {
                return false;
            }
        }

        return true;
    }
595237
protected boolean checkVisible() {

        return getHoverbar().getController().isEditable()
            && !CmsSitemapView.getInstance().isModelPageMode()
            && (!CmsSitemapView.getInstance().isGalleryMode() || getHoverbar().getController().getData().isGalleryManager());
    }
205325
public function isDevServerActive()
    {
        // Using Development Environment?
        
        if (!Director::isDev()) {
            return false;
        }
        
        // Already Checked Server?
        
        if ($this->devServerTested) {
            return $this->devServerActive;
        }
        
        // Test Server Connection:
        
        return $this->testDevServer();
    }
142875
public function is_in_review_mode() {
        global $DB, $USER;

        $userhasgrade = $DB->count_records("lesson_grades", array("lessonid" => $this->properties->id, "userid" => $USER->id));
        if ($userhasgrade && !$this->properties->retake) {
            return true;
        }
        return false;
    }
248035
public function isClean()
    {
        if ($this->getConfigFileAge() > max($this->getSassMaxAge(), $this->getStylesheetsMaxAge())) {
            return false;
        }

        return $this->getSassMaxAge() <= $this->getStylesheetsMaxAge();
    }
431624
public function enabled() : bool
    {
        if ($this->isEnabled !== null) {
            return $this->isEnabled;
        }

        if (!$this->config->get("antispam.{$this->instanceType}.enabled", true)) {
            return $this->isEnabled = false;
        }

        $disabledEnv = (array) $this->config->get("antispam.{$this->instanceType}.disabled_env", []);

        if (in_array($this->config->get('app.env', 'production'), $disabledEnv)) {
            return $this->isEnabled = false;
        }

        if ($this->instanceType === 'recaptcha') {
            if ($this->config->get('antispam.recaptcha.guests_only', false) && $this->request->user() !== null) {
                return $this->isEnabled = false;
            }
        }

        return $this->isEnabled = true;
    }
1166542
protected function checkMode()
    {
        $modes = array( self::MODE_KERNEL, self::MODE_EXTENSION,
                        self::MODE_TESTS, self::MODE_SINGLE_EXTENSION, self::MODE_KERNEL_OVERRIDE );

        $activeModes = array();

        foreach( $modes as $mode )
        {
            if ( ( $this->mask & $mode ) == $mode )
            {
                $activeModes[] = $mode;
            }
        }
        return $activeModes;
    }
819755
public function isEnabled()
    {
        if (null === $this->enablePdfPreview) {
            $this->enablePdfPreview = $this->getContainer()->getParameter('kunstmaan_media.enable_pdf_preview');
        }

        return $this->enablePdfPreview;
    }
849451
public function isSupported()
    {
        $mixer = $this->getMixer();

        //Disable controller persistency on requests containing the tmpl variable set to component (modal boxes)
        if ($mixer->getRequest()->query->get('tmpl', 'cmd') === 'component') {
            return false;
        }

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

        return (bool) count($this->children);
    }
718122
public function getPreview()
    {
        $url = trim($this->value);
        if (!$this->display_video || !$url) {
            return false;
        }
        $obj = VideoLink::create()->setValue($url);
        if ($obj->iFrameURL) {
            return $obj->Iframe($this->display_video, $this->preview_height);
        }
    }
309567
public function getOutputDecorated()
    {
        if ($this->colorMode() === self::COLOR_MODE_AUTO) {
            return;
        } elseif ($this->colorMode() === self::COLOR_MODE_FORCED) {
            return true;
        } elseif ($this->colorMode() === self::COLOR_MODE_DISABLED) {
            return false;
        }
    }
1310610
public static function is($mode){
       
        if(is_int($mode) && self::get() == $mode){
             
            return true;
        }
        if(is_string($mode) && self::get() == self::getModeByName($mode)){
            return true;
        }
        return false;
    }
1336083
public boolean displayed() {
        boolean isDisplayed = false;
        try {
            isDisplayed = element.getWebElement().isDisplayed();
        } catch (NoSuchElementException e) {
            log.info(e);
        }
        return isDisplayed;
    }
43504
protected function isPluginsScreen(): bool
    {
        if (!function_exists('get_current_screen')) {
            return false;
        }

        $screen = get_current_screen();

        if (empty($screen)) {
            return false;
        }

        return $screen->base === 'plugins' || $screen->base === 'plugins-network';
    }