mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
28 lines
586 B
PHP
28 lines
586 B
PHP
<?php
|
|
|
|
/**
|
|
* Represents an Image
|
|
*
|
|
* @package framework
|
|
* @subpackage filesystem
|
|
*/
|
|
class Image extends File {
|
|
public function __construct($record = null, $isSingleton = false, $model = null) {
|
|
parent::__construct($record, $isSingleton, $model);
|
|
$this->File->setAllowedCategories('image/supported');
|
|
}
|
|
|
|
public function getCMSFields() {
|
|
$fields = parent::getCMSFields();
|
|
$fields->insertAfter(
|
|
'LastEdited',
|
|
new ReadonlyField("Dimensions", _t('AssetTableField.DIM','Dimensions') . ':')
|
|
);
|
|
return $fields;
|
|
}
|
|
|
|
public function getIsImage() {
|
|
return true;
|
|
}
|
|
}
|