-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathImageAssetManager.php
More file actions
29 lines (23 loc) · 860 Bytes
/
ImageAssetManager.php
File metadata and controls
29 lines (23 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
class ImageAssetManager extends ImageDataObjectManager
{
public function __construct($controller, $name, $sourceClass = "Image", $headings = null)
{
if($headings === null) {
$headings = array(
'Title' => 'Title',
'Filename' => 'Filename'
);
}
$fields = singleton($sourceClass)->getCMSFields();
$fields->removeByName("OwnerID");
$fields->removeByName("Parent");
$fields->removeByName("Filename");
$fields->removeByName("SortOrder");
$fields->removeByName("Sort");
$fields->push(new ReadonlyField('Filename'));
$fields->push(new SimpleTreeDropdownField('ParentID','Folder',"Folder"));
$fields->push(new HiddenField('ID','',$controller->ID));
parent::__construct($controller, $name, $sourceClass, null, $headings, $fields, "\"ClassName\" != 'Folder'");
}
}