protected $mRelevantTitle = null;
protected $mRelevantUser = null;
+ /**
+ * @var string Stylesheets set to use. Subdirectory in skins/ where various stylesheets are
+ * located. Only needs to be set if you intend to use the getSkinStylePath() method.
+ */
+ public $stylename = null;
+
/**
* Fetch the set of available skins.
* @return array Associative array of strings
* Return a fully resolved style path url to images or styles stored in the current skins's folder.
* This method returns a url resolved using the configured skin style path
* and includes the style version inside of the url.
+ *
+ * Requires $stylename to be set, otherwise throws MWException.
+ *
* @param string $name The name or path of a skin resource file
* @return string The fully resolved style path url including styleversion
*/
function getSkinStylePath( $name ) {
global $wgStylePath, $wgStyleVersion;
+
+ if ( $this->stylename === null ) {
+ $class = get_class( $this );
+ throw new MWException( "$class::\$stylename must be set to use getSkinStylePath()" );
+ }
+
return "$wgStylePath/{$this->stylename}/$name?$wgStyleVersion";
}
*/
public $skinname = 'monobook';
- /**
- * @var string Stylesheets set to use. Subdirectory in skins/ where various
- * stylesheets are located. Child classes should override the default.
- */
- public $stylename = 'monobook';
-
/**
* @var string For QuickTemplate, the name of the subclass which will
* actually fill the template. Child classes should override the default.
class SkinMonoBook extends SkinTemplate {
/** Using monobook. */
public $skinname = 'monobook';
- public $stylename = 'monobook';
public $template = 'MonoBookTemplate';
/**