PHP Class Ip\Internal\Design\Model

Show file Open project: impresspages/impresspages Class Usage Examples

Public Methods

Method Description
getAvailableThemes ( ) : Ip\Internal\Design\Theme[]
getMarketUrl ( )
getTheme ( $name, null $dir = null, null $url = null ) : Ip\Internal\Design\Theme Read theme config and create theme entity
getThemeInstallDir ( )
getThemeLayouts ( ) : array Returns possible layout pages.
getThemePlugins ( )
installTheme ( $themeName )
installThemePlugin ( $pluginName )
instance ( ) : Model
isThemeAvailable ( $name )

Protected Methods

Method Description
__construct ( )
getFolderThemes ( string $folder ) : array
getThemePluginDir ( )
parseThemeIni ( $file ) Parse old style theme.ini file for theme configuration values
parseThemeJson ( $file )

Method Details

__construct() protected method

protected __construct ( )

getAvailableThemes() public method

public getAvailableThemes ( ) : Ip\Internal\Design\Theme[]
return Ip\Internal\Design\Theme[]

getFolderThemes() protected method

protected getFolderThemes ( string $folder ) : array
$folder string absolute path
return array

getMarketUrl() public method

public getMarketUrl ( )

getTheme() public method

Read theme config and create theme entity
public getTheme ( $name, null $dir = null, null $url = null ) : Ip\Internal\Design\Theme
$name
$dir null
$url null
return Ip\Internal\Design\Theme

getThemeInstallDir() public method

public getThemeInstallDir ( )

getThemeLayouts() public static method

files starting with underscore (for example, _layout.php) are considered hidden.
public static getThemeLayouts ( ) : array
return array layouts (e.g. ['main.php', 'home.php'])

getThemePluginDir() protected method

protected getThemePluginDir ( )

getThemePlugins() public method

public getThemePlugins ( )

installTheme() public method

public installTheme ( $themeName )

installThemePlugin() public method

public installThemePlugin ( $pluginName )

instance() public static method

public static instance ( ) : Model
return Model

isThemeAvailable() public method

public isThemeAvailable ( $name )

parseThemeIni() protected method

Parse old style theme.ini file for theme configuration values
protected parseThemeIni ( $file )

parseThemeJson() protected method

protected parseThemeJson ( $file )