From 6d6b43b21d1932f12af539bd2c22c66927db5d1a Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sat, 26 Apr 2008 06:42:10 +0000 Subject: [PATCH] Merged revisions 53216 via svnmerge from http://svn.silverstripe.com/open/modules/cms/branches/2.2.2 ........ r53216 | sharvey | 2008-04-22 18:07:35 +1200 (Tue, 22 Apr 2008) | 1 line FEATURE: added phpdoc comments to the API calls for customising CMS rebranding ........ git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@53505 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/LeftAndMain.php | 62 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 5ba45625..c35567ab 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -795,32 +795,80 @@ JS; } /** - * The application name is customisable by calling - * LeftAndMain::setApplicationName("Something New") + * The application name. Customisable by calling + * LeftAndMain::setApplicationName() - the first parameter. + * + * @var String + */ + static $application_name = 'SilverStripe CMS'; + + /** + * The application logo text. Customisable by calling + * LeftAndMain::setApplicationName() - the second parameter. + * + * @var String + */ + static $application_logo_text = 'SilverStripe'; + + /** + * Set the application name, and the logo text. + * + * @param String $name The application name + * @param String $logoText The logo text */ - static $application_name = "SilverStripe CMS", $application_logo_text = "SilverStripe"; static $application_link = "http://www.silverstripe.com/"; static function setApplicationName($name, $logoText = null, $link = null) { self::$application_name = $name; self::$application_logo_text = $logoText ? $logoText : $name; if($link) self::$application_link = $link; } - function ApplicationName() { + + /** + * Get the application name. + * @return String + */ + function getApplicationName() { return self::$application_name; } - function ApplicationLogoText() { + + /** + * Get the application logo text. + * @return String + */ + function getApplicationLogoText() { return self::$application_logo_text; } function ApplicationLink() { return self::$application_link; } - static $application_logo = "cms/images/mainmenu/logo.gif", $application_logo_style = ""; + /** + * The application logo path. Customisable by calling + * LeftAndMain::setLogo() - the first parameter. + * + * @var unknown_type + */ + static $application_logo = 'cms/images/mainmenu/logo.gif'; + /** + * The application logo style. Customisable by calling + * LeftAndMain::setLogo() - the second parameter. + * + * @var String + */ + static $application_logo_style = ''; + + /** + * Set the CMS application logo. + * + * @param String $logo Relative path to the logo + * @param String $logoStyle Custom CSS styles for the logo + * e.g. "border: 1px solid red; padding: 5px;" + */ static function setLogo($logo, $logoStyle) { self::$application_logo = $logo; self::$application_logo_style = $logoStyle; - self::$application_logo_text = ""; + self::$application_logo_text = ''; } protected static $loading_image = 'cms/images/loading.gif';