System\Classes\ProductDetail

Overview

ProductDetail contains details about a plugin or theme, sourcing information from either the file system or marketplace endpoint.


Public Properties

public bool $isTheme

isTheme product

public bool $canInstall

canInstall product

public string $name

name for product

public string $code

code for product

public string $composerCode

public string $composerVersion

public string $currentVersion

public string $author

author of product

public string $icon

Product icon

public string $image

Product image

public string $homepage

Product website URL

public string $contentHtml

Sales / Readme content

public string $upgradeHtml

Upgrade guide

public string $licenseHtml

License information

Protected Properties

protected bool $isFound

isFound determines if a product was found

protected bool $isInstalled

isInstalled determines if a product is installed

protected bool $isOrphaned

isOrphaned is for plugins found in the database but not filesystem


Public Methods

public __construct()

public __construct($productCode, $isTheme = false): void

public exists()

public exists(): bool 

public installed()

public installed(): bool 

Protected Methods

protected getProductMarkdownFile()

protected getProductMarkdownFile($path, $filenames): string 

getProductMarkdownFile checks a path for supplied filesnames to parse as Markdown

protected initPluginDatabase()

protected initPluginDatabase(): bool 

protected initPluginLocal()

protected initPluginLocal(): bool 

protected initPluginRemote()

protected initPluginRemote(): bool 

protected initThemeLocal()

protected initThemeLocal(): bool 

protected initThemeRemote()

protected initThemeRemote(): bool 

protected normalizeProductEndpoint()

protected normalizeProductEndpoint($url): void

normalizeProductEndpoint only allows trusted hostnames for security reasons