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:
Ingo Schommer 2008-05-10 02:21:26 +00:00
parent 52e1c2cd66
commit c60be4238c

View File

@ -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
*/