2007-07-19 12:40:28 +02:00
|
|
|
<?php
|
2010-12-20 03:19:17 +01:00
|
|
|
|
2007-07-19 12:40:28 +02:00
|
|
|
/**
|
2010-12-20 03:19:17 +01:00
|
|
|
* Represents an Image
|
|
|
|
*
|
2012-04-12 08:02:46 +02:00
|
|
|
* @package framework
|
2008-02-25 03:10:37 +01:00
|
|
|
* @subpackage filesystem
|
2007-07-19 12:40:28 +02:00
|
|
|
*/
|
2015-09-15 04:52:02 +02:00
|
|
|
class Image extends File {
|
|
|
|
public function __construct($record = null, $isSingleton = false, $model = null) {
|
|
|
|
parent::__construct($record, $isSingleton, $model);
|
|
|
|
$this->File->setAllowedCategories('image/supported');
|
2007-07-19 12:40:28 +02:00
|
|
|
}
|
2012-02-23 22:43:37 +01:00
|
|
|
|
2012-09-19 12:07:39 +02:00
|
|
|
public function getCMSFields() {
|
2012-04-13 15:46:47 +02:00
|
|
|
$fields = parent::getCMSFields();
|
2015-09-15 04:52:02 +02:00
|
|
|
$fields->insertAfter(
|
|
|
|
'LastEdited',
|
|
|
|
new ReadonlyField("Dimensions", _t('AssetTableField.DIM','Dimensions') . ':')
|
2013-04-15 12:17:00 +02:00
|
|
|
);
|
2015-09-15 04:52:02 +02:00
|
|
|
return $fields;
|
2013-04-15 12:17:00 +02:00
|
|
|
}
|
2013-09-27 19:06:56 +02:00
|
|
|
|
2015-09-15 04:52:02 +02:00
|
|
|
public function getIsImage() {
|
|
|
|
return true;
|
2015-09-09 06:18:39 +02:00
|
|
|
}
|
2011-08-26 17:57:05 +02:00
|
|
|
}
|