mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Rename DefaultEllipsis to defaultEllipsis
This commit is contained in:
parent
896c0e4388
commit
26b8b7964e
@ -217,7 +217,7 @@ abstract class DBString extends DBField
|
||||
}
|
||||
|
||||
/**
|
||||
* Swap add for DefaultEllipsis if need be
|
||||
* Swap add for defaultEllipsis if need be
|
||||
* @param string $string
|
||||
* @param false|string $add
|
||||
* @return string
|
||||
@ -225,7 +225,7 @@ abstract class DBString extends DBField
|
||||
private function addEllipsis(string $string, $add): string
|
||||
{
|
||||
if ($add === false) {
|
||||
$add = $this->DefaultEllipsis();
|
||||
$add = $this->defaultEllipsis();
|
||||
}
|
||||
|
||||
return $string . $add;
|
||||
@ -235,7 +235,7 @@ abstract class DBString extends DBField
|
||||
* Get the default string to indicate that a string was cut off.
|
||||
* @return string
|
||||
*/
|
||||
public function DefaultEllipsis(): string
|
||||
public function defaultEllipsis(): string
|
||||
{
|
||||
return _t(self::class . '.ELLIPSIS', '…');
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ class DBText extends DBString
|
||||
|
||||
// If no $elipsis string is provided, use the default one.
|
||||
if ($add === false) {
|
||||
$add = $this->DefaultEllipsis();
|
||||
$add = $this->defaultEllipsis();
|
||||
}
|
||||
|
||||
// Split on sentences (don't remove period)
|
||||
|
@ -350,6 +350,6 @@ class DBTextTest extends SapphireTest
|
||||
public function testDefaultEllipsis()
|
||||
{
|
||||
$textObj = new DBText('Test');
|
||||
$this->assertEquals('…', $textObj->DefaultEllipsis());
|
||||
$this->assertEquals('…', $textObj->defaultEllipsis());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user