mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API CHANGE Removed LeftAndMain->setApplicationName() $logoText parameter, and LeftAndMain->getApplicationLogoText(), overload templates instead
This commit is contained in:
parent
05f0ce3a21
commit
cfaec05141
@ -1068,31 +1068,13 @@ class LeftAndMain extends Controller {
|
||||
*/
|
||||
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_link = "http://www.silverstripe.org/";
|
||||
|
||||
/**
|
||||
* @param String $name
|
||||
* @param String $logoText
|
||||
* @param String $link (Optional)
|
||||
*/
|
||||
static function setApplicationName($name, $logoText = null, $link = null) {
|
||||
static function setApplicationName($name) {
|
||||
self::$application_name = $name;
|
||||
self::$application_logo_text = $logoText ? $logoText : $name;
|
||||
if($link) self::$application_link = $link;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1102,21 +1084,6 @@ class LeftAndMain extends Controller {
|
||||
function getApplicationName() {
|
||||
return self::$application_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the application logo text.
|
||||
* @return String
|
||||
*/
|
||||
function getApplicationLogoText() {
|
||||
return self::$application_logo_text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
function ApplicationLink() {
|
||||
return self::$application_link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the title of the current section, as shown on the main menu
|
||||
@ -1145,7 +1112,6 @@ class LeftAndMain extends Controller {
|
||||
*/
|
||||
static function setLogo($logo) {
|
||||
self::$application_logo = $logo;
|
||||
self::$application_logo_text = '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,5 @@
|
||||
<div id="Logo">
|
||||
<% if ApplicationLogoText %>
|
||||
<a href="$ApplicationLink" target="_blank">$ApplicationLogoText</a><br />
|
||||
<% end_if %>
|
||||
<div class="logo">
|
||||
<a href="http://www.silverstripe.org/" target="_blank">SilverStripe</a><br />
|
||||
</div>
|
||||
<ul id="MainMenu">
|
||||
<% control MainMenu %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user