mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR changed Tag() to getTag() to allow for field casting and unified getting (e.g. in TableListField)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@54292 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
52e1c2cd66
commit
c60be4238c
@ -11,6 +11,11 @@
|
||||
* @subpackage filesystem
|
||||
*/
|
||||
class Image extends File {
|
||||
|
||||
static $casting = array(
|
||||
'Tag' => 'HTMLText',
|
||||
);
|
||||
|
||||
/**
|
||||
* The width of an image thumbnail in a strip.
|
||||
* @var int
|
||||
@ -94,7 +99,7 @@ class Image extends File {
|
||||
* Return an XHTML img tag for this Image.
|
||||
* @return string
|
||||
*/
|
||||
function Tag() {
|
||||
function getTag() {
|
||||
if(file_exists("../" . $this->Filename)) {
|
||||
$url = $this->URL();
|
||||
$title = $this->Title;
|
||||
@ -376,6 +381,13 @@ class Image extends File {
|
||||
// DEPRECATED
|
||||
// ###################
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
function Tag() {
|
||||
return $this->getTag();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user