Return true if the method can be used at this time
@since 0.1.0.3r1
@return bool
334104
public function isAvailable($quote = null)
    {
        if (!parent::isAvailable($quote)) {
            return false;
        }

        if (!is_null($quote)) {
            if ($this->_getConfigData('allowspecific', $this->_code)) {
                $country = $quote->getShippingAddress()->getCountry();
                $availableCountries = explode(',', $this->_getConfigData('specificcountry', $this->_code));
                if (!in_array($country, $availableCountries)) {
                    return false;
                }
            }
        }

        return true;
    }
1069954
protected function _isActionEnabled() {
		$actions = $this->getConfig('actions');
		if (!$actions) {
			return true;
		}

		return in_array($this->getController()->getRequest()->getParam('action'), $actions, true);
	}
1186354
protected function canBeCached()
    {
        if ($this->getSecurityToken()->isEnabled()) {
            return false;
        }
        if ($this->FormMethod() !== 'GET') {
            return false;
        }

        // Don't cache if there are required fields, or some other complex validator
        $validator = $this->getValidator();
        if ($validator instanceof RequiredFields) {
            if (count($this->validator->getRequired())) {
                return false;
            }
        } else {
            return false;
        }
        return true;
    }
1330205
public function isPaginationable()
    {
        return ! is_null($this->request->input('start')) &&
            ! is_null($this->request->input('length')) &&
            $this->request->input('length') != -1;
    }
1278482
public function isAvailable()
    {
        if (!empty($this->adapter)) {
            // adapter is already etablished
            return true;
        }
        $user = $this->getUser();
        $sessionDataStored = $user->getAuthSession($this->providerKey);
        if (empty($sessionDataStored)) {
            // for this user no session has been stored
            return false;
        }
        $hybridAuth = $this->getHybridAuth();
        $hybridAuth->restoreSessionData($sessionDataStored);
        if ($hybridAuth->isConnectedWith($this->providerKey)) {
            return true;
        }
        return false;
    }
1317728
public function isAvailable()
    {
        $isDebugging = $this->_logger->isHandling(ehough_epilog_Logger::DEBUG);

        if (! function_exists('fopen')) {

            if ($isDebugging) {

                $this->_logger->debug('fopen() is not available.');
            }

            return false;
        }

        if (function_exists('ini_get') && ini_get('allow_url_fopen') != true) {

            if ($isDebugging) {

                $this->_logger->debug('allow_url_fopen is set to false.');
            }

            return false;
        }

        return true;
    }
1363933
public static function canCallAPI()
    {
        $lastCall = Setting::getSetting('twitter', 'last_api_call');

        if ($lastCall == null) {
            return true;
        } else {
            $lastCall = new \DateTime($lastCall);
        }

        $now = new \DateTime();
        $interval = $lastCall->diff($now);

        // Are we at least one minute ago?
        if ($interval->i >= 1) {
            return true;
        } else {
            return false;
        }
    }
805602
public function IsAvailable()
    {
        $bIsValid = true;
        $bIsValid = ($bIsValid && $this->IsActive());
        if (!$bIsValid) {
            return $bIsValid;
        }
        $oPaymentHandler = $this->GetFieldShopPaymentHandler();
        $bIsValid = ($bIsValid && !is_null($oPaymentHandler) && $oPaymentHandler->AllowUse($this));
        $bIsValid = ($bIsValid && $this->IsValidForCurrentUser());
        $bIsValid = ($bIsValid && $this->IsValidForBasket());

        return $bIsValid;
    }
1089022
public function canCache()
    {
        // Check if the response is cacheable based on the code
        if (!in_array((int) $this->getStatusCode(), self::$cacheResponseCodes)) {
            return false;
        }

        // Make sure a valid body was returned and can be cached
        if ((!$this->getBody()->isReadable() || !$this->getBody()->isSeekable())
            && ($this->getContentLength() > 0 || $this->getTransferEncoding() == 'chunked')) {
            return false;
        }

        // Never cache no-store resources (this is a private cache, so private
        // can be cached)
        if ($this->getHeader('Cache-Control') && $this->getHeader('Cache-Control')->hasDirective('no-store')) {
            return false;
        }

        return $this->isFresh() || $this->getFreshness() === null || $this->canValidate();
    }
1090018
public function canSave()
    {
        if($this->getRequest()->getFormat() == 'html')
        {
            if($this->getModel()->getState()->isUnique())
            {
                if($this->canEdit() && !$this->isLocked()) {
                    return true;
                }
            }
            else
            {
                if($this->canAdd()) {
                    return true;
                }
            }
        }

        return false;
    }
755248
public function isHintEnabled()
    {
        $isParamPresent = $this->_request->getParam('ath', false) === '1';

        if ($isParamPresent) {
            $applicationMode = $this->appState->getMode();
            $storeId = $this->storeManager->getStore()->getId();

            if ($applicationMode === AppState::MODE_DEVELOPER || $this->developerHelper->isDevAllowed($storeId)) {
                return true;
            }
        }

        return false;
    }
1337319
public function canViewTarget()
    {
        $action = $this->CurrentAction();
        if ($action) {
            return $action->canViewTarget($this->getTarget());
        }
        return true;
    }
202177
public function canUpdate()
    {
        return $this->canModify() && (
            $this->canInstall() || (
                ! empty( $this->installedVersion ) && (
                    ( ( $this->availableVersion == 'dev-master' ||
                        $this->installedVersion == 'dev-master' ) &&
                      $this->installedReference != $this->availableReference ) ||
                    version_compare(
                        $this->availableVersion,
                        $this->installedVersion,
                        '>'
                    )
                )
            )
        );
    }
1146390
protected function canAccess()
    {
        $result = false;
        $page = Page::getByPath('/dashboard/system/basics/editor');
        if ($page && !$page->isError()) {
            $checker = new Checker($page);
            $result = $checker->canViewPage();
        }

        return $result;
    }
938728
public function canApply()
    {
        $subject = $this->getSubject();
        $nodeType = $this->getNodeType();

        return $subject->isNodeTypeAllowedAsChildNode($nodeType);
    }
1036469
public function isAccessible()
    {
        $loop = $this;
        $access = true;

        while ($loop->getReply() != null) {
            $loop = $loop->getReply();

            if ($loop->getSpam() == 1 || $loop->getActive() == 0 || $loop->isEmailValid() == 0) {
                $access = false;
            }
        }

        return $access;
    }
1195185
protected function isDeletable()
    {
        return
            $this->deletable
            &&
            ! $this->isTrashed()
            &&
            $this->getModelConfiguration()->isDeletable(
                $this->getModel()
            );
    }