Check if a plugin is active

@return bool
@throws \Exception
13932
public function isActive()
    {
        // wee need a namespace first
        if(!isset($this->namespace)) {
            return false;
        }

        // Plugin is not active is it's not installed
        if(!self::isInstalled($this->namespace)) {
            return false;
        }

        if(!$this->isActive) {
            return false;
        }
        return true;
    }
1311094
public static function getActive()
    {
        if (self::$skinCache !== null) {
            return self::$skinCache;
        }

        $skinClass = Config::get('cms.backendSkin');
        $skinObject = new $skinClass();
        return self::$skinCache = $skinObject;
    }
161839
public static function is_loggedin() {
	if (self::is_active() == false) {
		return false;
	}
	if (self::get_user_id() == false) {
		return false;
	}
	
	return true;
}
1323012
def is_active(self):
    
    if not self._multiplexer:
      return False

    scalars_plugin_instance = self._get_scalars_plugin()
    if not (scalars_plugin_instance and
            scalars_plugin_instance.is_active()):
      return False

    # This plugin is active if any run has a layout.
    return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME))
273574
private function is_premium_plugin_active( $plugin_id = false ) {
            if ( $plugin_id != $this->_fs->get_id() ) {
                return $this->_fs->is_addon_activated( $plugin_id, true );
            }

            return is_plugin_active( $this->_fs->premium_plugin_basename() );
        }
55757
def is_active(self):
    
    if self._db_connection_provider:
      # The plugin is active if one relevant tag can be found in the database.
      db = self._db_connection_provider()
      cursor = db.execute(
          '''
          SELECT 1
          FROM Tags
          WHERE Tags.plugin_name = ?
          LIMIT 1
          ''',
          (metadata.PLUGIN_NAME,))
      return bool(list(cursor))

    if not self._multiplexer:
      return False

    all_runs = self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME)

    # The plugin is active if any of the runs has a tag relevant to the plugin.
    return any(six.itervalues(all_runs))
139646
public function is_plugin_activated( $slug )
	{
		$element = $this->search_plugin( $slug );
		if ( ! $element ) {
			throw new \Exception( sprintf(
				"The %s plugin is not installed.",
				$slug
			) );
		}
		$classes = preg_split( '/\s+/', trim( $element->getAttribute( "class" ) ) );
		if ( in_array( 'active', $classes ) ) {
			return true;
		} else {
			return false;
		}
	}
1350342
public function isLoaded($plugin)
    {
        $pluginClass = get_class($this->getBundle($plugin));

        foreach ($this->loadedBundles as $bundle => $isEnabled) {
            if ($bundle === $pluginClass && $isEnabled) {
                return true;
            }
        }

        return false;
    }
739228
public function isActive()
    {
        $sid = defined('SID') ? constant('SID') : false;
        if ($sid !== false && session_id()) {
            return true;
        }

        if (headers_sent()) {
            return true;
        }

        return false;
    }
1175961
private function is_logger_active() {
		if ( ! $this->product->is_wordpress_available() ) {
			return true;
		}
		$pro_slug = $this->product->get_pro_slug();

		if ( ! empty( $pro_slug ) ) {
			$all_products = Loader::get_products();
			if ( isset( $all_products[ $pro_slug ] ) ) {
				return true;
			}
		}

		return ( get_option( $this->product->get_key() . '_logger_flag', 'no' ) === 'yes' );
	}
1338792
private static function validate() {
	if (self::is_active() == false) {
		$exception = bootstrap::get_library('exception');
		throw new $exception('inactive session');
	}
	
	if (empty($_SESSION['_session_type']) || empty($_SESSION['_session_last_active'])) {
		return false;
	}
	
	// throw away expired (replaced) sessions
	if (!empty($_SESSION['_session_expire_at']) && $_SESSION['_session_expire_at'] < time()) {
		return false;
	}
	
	// last_active short enough ago
	$type_duration = self::$type_durations[ $_SESSION['_session_type'] ];
	$active_enough = ($_SESSION['_session_last_active'] > (time() - $type_duration));
	if ($active_enough == false) {
		return false;
	}
	
	return true;
}
962166
public function isActive()
    {
        $url  = url($this->present()->url());
        $path = request()->path();

        return $url == request()->url() || $url == $path || url($url, [], true) == url($path, [], true);
    }
91816
public function isActive()
    {
        $active = ($this->cookie !== null && $this->cookie != '');
        
        if ($this->sizeLimit && $this->sizeLimit === $this->pageSize) {
            $active = false;
        }
        
        return $active;
    }
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;
    }
1098096
def is_active(self):
        """"""
        if self._queue.exhausted:
            return False
        return any(ch.is_active for ch in self._refs.values())
1228202
public function isActive()
	{
		$this->numberChecks++;
		$time	= microtime( TRUE ) - $this->time;
		return $time < $this->seconds;
	}
431949
public function getStatusAttribute()
    {
        if ($this->isActive()) {
            return self::STATUS_ACTIVE;
        }

        if ($this->isCanceled()) {
            return self::STATUS_CANCELED;
        }

        if ($this->isEnded()) {
            return self::STATUS_ENDED;
        }
    }