namespace \webfiori\framework
abstract class Theme
Class Methods Summary
Class Methods Details
Creates new instance of the class using default values. The default values will be set as follows:
- Theme URL will be an empty string.
- Author name will be an empty string.
- Author URL will be an empty string.
- Theme version will be set to '1.0.0'
- Theme license will be an empty string.
- License URL will be an empty string.
- Theme description will be an empty string.
- Theme directory name will be an empty string.
- Theme CSS directory name will be set to 'css'
- Theme JS directory name will be set to 'js'
- Theme images directory name will be set to 'images'
Parameters:
- $themeName The name of the theme. The name is used to load the theme. For that reason, it must be unique.
Parameters:
- array $options An array of options that developer can specify. Default implementation of the method accepts two options, the option 'name' which represents the name of HTML tag (such as 'div') and the option 'attributes' which is a sub array that contains tag attributes.
Parameters:
Parameters:
- string $author The name of theme author (such as 'Ibrahim BinAlshikh').
Parameters:
- string $authorUrl The URL to the author's web site.
Parameters:
- string $url The base URL that will be used by the theme.
Parameters:
- callback $function The callback. The first parameter of the callback will be always 'this' theme. (e.g. function ($theme){}). The function can have other parameters if they are provided.
- array $params An array of parameters which can be passed to the callback.
Parameters:
- string $name The name of the directory where theme CSS files are kept.
Parameters:
- string $desc Theme description. Usually a short paragraph of two or 3 sentences. It must be non-empty string in order to set.
Parameters:
- string $name The name of the directory where theme images are kept.
Parameters:
- string $name The name of the directory where theme JavaScript files are kept.
Parameters:
- string $text The name of theme license. It must be non-empty string in order to set.
Parameters:
- string $url A URL to the license.
Parameters:
- string $name The name of the theme. It must be non-empty string in order to set. Note that the name of the theme acts as the unique identifier for the theme. It can be used to load the theme later.
Parameters:
- WebPage $page The page that the theme is applied to.
Parameters:
- string $url The URL to theme designer web site.
Parameters:
- string $vNum Version number. The format of version number is usually like 'X.X.X' where the 'X' can be any number.
Returns an object of type Json that represents the theme. JSON string that will be generated by the Json instance will have the following information:
{
"themesPath":""
"name":""
"version":""
"author":""
"imagesDirName":""
"themeDirName":""
"cssDirName":""
"jsDirName":""
}