Determine if the entity has an active subscription.

@return bool
322181
public function subscribed()
	{
		if ($this->requiresCardUpFront()) {
			return $this->braintreeIsActive() || $this->onGracePeriod();
		}
		else {
			return $this->braintreeIsActive() || $this->onTrial() || $this->onGracePeriod();
		}
	}
733247
public function getSubscription()
    {
        if (null === $this->_subscription) {
            $this->_subscription = Subscription::find()->id($this->subscriptionId)->one();
        }

        return $this->_subscription;
    }
293380
private function IsActive()
    {
        $pageItem = $this->naviItem->GetPageItem();
        if (!$pageItem)
        {
            return false;
        }
        return $pageItem->GetPage()->Equals(PageRenderer::Page());
    }
294972
public function isPublic()
	{
		// This page not active
		if ( ! $this->active) {
			return false;
		}

		$pathEntity = $this->getPathEntity();

		return $pathEntity->isActive()
				&& $pathEntity->getPath() !== null;
	}
882308
public function contains_active_node() {
        if ($this->isactive) {
            return true;
        } else {
            foreach ($this->children as $child) {
                if ($child->isactive || $child->contains_active_node()) {
                    return true;
                }
            }
        }
        return false;
    }
662455
public static function is_active() {
	if (session_status() != PHP_SESSION_ACTIVE) {
		return false;
	}
	if (empty($_SESSION['_session_type']) || empty($_SESSION['_session_last_active'])) {
		return false;
	}
	
	return true;
}
489196
public function isActive()
    {
        if (($page = Director::get_current_page()) && $page instanceof Page) {
            
            $ids = $this->Pages()->column('ID');
            
            if (!$this->isInherited()) {
                return in_array($page->ID, $ids);
            }
            
            return !empty(array_intersect($ids, $page->getAncestors(true)->column('ID')));
            
        }
        
        return false;
    }
593635
public function isActive()
    {
        //If check was made once return result
        if ($this->_blActive !== null) {
            return $this->_blActive;
        }

        //Check if payment method itself is active
        $sTable = getViewName('oxpayments');
        $sSql = "SELECT OXACTIVE
            FROM {$sTable}
            WHERE OXID = 'bestitamazon'";

        $blPaymentActive = (bool)$this->getDatabase()->getOne($sSql);

        if ($blPaymentActive === false) {
            return $this->_blActive = false;
        }

        //Check if payment has at least one shipping method assigned
        $sO2PTable = getViewName('oxobject2payment');
        $sDelSetTable = getViewName('oxdeliveryset');
        $sSql = "SELECT OXOBJECTID
            FROM {$sO2PTable} AS o2p RIGHT JOIN {$sDelSetTable} AS d 
              ON (o2p.OXOBJECTID = d.OXID AND d.OXACTIVE = 1)
            WHERE OXPAYMENTID = 'bestitamazon'
              AND OXTYPE='oxdelset'
            LIMIT 1";

        $sShippingId = (string)$this->getDatabase()->getOne($sSql);

        if ($sShippingId === '') {
            return $this->_blActive = false;
        }

        //Check if shipping method has at least one shipping cost assigned
        $sTable = getViewName('oxdel2delset');
        $sSql = "SELECT OXID 
            FROM {$sTable} 
            WHERE OXDELSETID = {$this->getDatabase()->quote($sShippingId)}
            LIMIT 1";
        $sShippingCostRelated = (string)$this->getDatabase()->getOne($sSql);

        if ($sShippingCostRelated === '') {
            return $this->_blActive = false;
        }

        //Check if selected currency is available for selected Amazon locale
        if ($this->getIsSelectedCurrencyAvailable() === false) {
            return $this->_blActive = false;
        }

        $oConfig = $this->getConfig();

        //If Amazon SellerId is empty
        if ((string)$oConfig->getConfigParam('sAmazonSellerId') === '') {
            return $this->_blActive = false;
        }

        //If basket items price = 0
        if ((string)$oConfig->getRequestParameter('cl') !== 'details'
            && (int)$this->getSession()->getBasket()->getPrice()->getBruttoPrice() === 0
        ) {
            return $this->_blActive = false;
        }

        return $this->_blActive = true;
    }
341867
private function checkAllSubscribersAreStatic(array $subscribers): bool
    {
        $result = true;
        foreach ($subscribers as $eventName => $callableList) {
            if (is_string($eventName) === false || is_array($callableList) === false) {
                $result = false;
                break;
            }
            foreach ($callableList as $mightBeCallable) {
                $method = $this->parseStaticMethod($mightBeCallable);
                if ($method === null || $method->isStatic() === false) {
                    $result = false;
                    break;
                }
            }
        }

        return $result;
    }
43172
public function isCacheActiveForTheCurrentUser(): bool
    {
        $active = true;

        // test the cache, with this GET-parameter
        if ($this->disableCacheGetParameter) {
            $testCache = isset($_GET[$this->disableCacheGetParameter]) ? (int) $_GET[$this->disableCacheGetParameter] : 0;
        } else {
            $testCache = 0;
        }

        if ($testCache !== 1) {
            if (
                // admin session is active
                (
                    $this->useCheckForAdminSession
                    &&
                    $this->isAdminSession
                )
                ||
                // server == client
                (
                    $this->useCheckForServerIpIsClientIp
                    &&
                    isset($_SERVER['SERVER_ADDR'])
                    &&
                    $_SERVER['SERVER_ADDR'] === $this->getClientIp()
                )
                ||
                // user is a dev
                (
                    $this->useCheckForDev
                    &&
                    $this->checkForDev()
                )
            ) {
                $active = false;
            }
        }

        return $active;
    }
514708
public function valid()
    {
        $isValid = $this->isFlagSet(self::STATUS_VALID);
        $subscriptionFlags = self::STATUS_SUBSCRIBED | self::STATUS_PSUBSCRIBED;
        $hasSubscriptions = ($this->statusFlags & $subscriptionFlags) > 0;

        return $isValid && $hasSubscriptions;
    }
6657
def customer_active?(code = nil)
      subscription = customer_subscription(code)
      if subscription[:canceledDatetime] && subscription[:canceledDatetime] <= Time.now
        false
      else
        true
      end
    end
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;
    }
854158
public function isCurrent()
    {
        $currentPage = Director::get_current_page();

        if ($currentPage instanceof ContentController) {
            $currentPage = $currentPage->data();
        }
        if ($currentPage instanceof CatalogueCategory || $currentPage instanceof CatalogueProduct) {
            return $currentPage === $this->owner || $currentPage->ID === $this->owner->ID;
        }
        return false;
    }
1081386
public function isTransactionActive()
    {
        try {
            $isTransactionActive = $this->connection->isTransactionActive();
        } catch (DBALException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        } catch (PDOException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        }

        return $isTransactionActive;
    }
421801
private function hasToBeReloaded()
    {
        if (!$this->getWurflConfig()->allowReload) {
            return false;
        }

        $state = $this->getPersistenceStorage()->load(self::WURFL_API_STATE);

        return !$this->isStateCurrent($state);
    }
1168884
public function checkPageSubjectInTitle() {
        if ($this->checkPageSubjectDefined()) {
            if (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $this->owner->MetaTitle)) {
                return true;
            } elseif (preg_match('/' . preg_quote($this->owner->SEOPageSubject, '/') . '/i', $this->owner->Title)) {
                return true;
            } else {
                return false;
            }
        }
        return false;
    }