classes/Tools/ToolBase.php
public function enabled()
    {
        if ($this->badPluginsInstalled) {
            return false;
        }

    	$env = ($this->env_variable) ? getenv($this->env_variable) : false;
        $enabled=get_option("ilab-media-tool-enabled-$this->toolName", $env);

        if ($enabled && isset($this->toolInfo['dependencies']))
        {
            foreach($this->toolInfo['dependencies'] as $dep)
            {
            	if (is_array($dep)) {
            		$enabledCount = 0;
					foreach($dep as $toolDep) {
						if ($this->toolManager->toolEnabled($toolDep)) {
							$enabledCount++;
							break;
						}
					}

					if ($enabledCount == 0) {
						return false;
					}
	            } else {
		            if (!$this->toolManager->toolEnabled($dep))
			            return false;
	            }
            }
        }

        return $enabled;
    }
public function enabled()
    {
        if ($this->badPluginsInstalled) {
            return false;
        }

    	$env = ($this->env_variable) ? getenv($this->env_variable) : false;
        $enabled=get_option("ilab-media-tool-enabled-$this->toolName", $env);

        if ($enabled && isset($this->toolInfo['dependencies']))
        {
            foreach($this->toolInfo['dependencies'] as $dep)
            {
            	if (is_array($dep)) {
            		$enabledCount = 0;
					foreach($dep as $toolDep) {
						if ($this->toolManager->toolEnabled($toolDep)) {
							$enabledCount++;
							break;
						}
					}

					if ($enabledCount == 0) {
						return false;
					}
	            } else {
		            if (!$this->toolManager->toolEnabled($dep))
			            return false;
	            }
            }
        }

        return $enabled;
    }
public function enabled ( ) { if ( $ this -> badPluginsInstalled ) { return false ; } $ env = ( $ this -> env_variable ) ? getenv ( $ this -> env_variable ) : false ; $ enabled = get_option ( "ilab-media-tool-enabled-$this->toolName" , $ env ) ; if ( $ enabled && isset ( $ this -> toolInfo [ 'dependencies' ] ) ) { foreach ( $ this -> toolInfo [ 'dependencies' ] as $ dep ) { if ( is_array ( $ dep ) ) { $ enabledCount = 0 ; foreach ( $ dep as $ toolDep ) { if ( $ this -> toolManager -> toolEnabled ( $ toolDep ) ) { $ enabledCount ++ ; break ; } } if ( $ enabledCount == 0 ) { return false ; } } else { if ( ! $ this -> toolManager -> toolEnabled ( $ dep ) ) return false ; } } } return $ enabled ; }
Determines if this tool is enabled or not
Determines if this tool is enabled or not