From c60be4238cee660478115256502c21e826ae882a Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 10 May 2008 02:21:26 +0000 Subject: [PATCH] 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 --- core/model/Image.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/model/Image.php b/core/model/Image.php index 1b3e3ff51..83e9e56d0 100755 --- a/core/model/Image.php +++ b/core/model/Image.php @@ -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 */