/** * @return FieldList */ public function getCMSFields() { $fields = parent::getCMSFields(); $fileAttributes = $fields->fieldByName('Root.Main.FilePreview')->fieldByName('FilePreviewData'); $fileAttributes->push(new ReadonlyField("Dimensions", _t('AssetTableField.DIM', 'Dimensions') . ':', $this->Width . ' x ' . $this->Height)); return $fields; }
/** * @return FieldList */ public function getCMSFields() { $fields = parent::getCMSFields(); $fileAttributes = $fields->fieldByName('Root.Main.FilePreview')->fieldByName('FilePreviewData'); if (!in_array($this->ClassName, array('VimeoVideo', 'YoutubeVideo'))) { $fileAttributes->push(new ReadonlyField("Dimensions", _t('AssetTableField.DIM', 'Dimensions') . ':', $this->Width . ' x ' . $this->Height)); } $fileAttributes->push(new ReadonlyField("Duration", 'Duration:')); return $fields; }