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
30
31
32
33
34
35
36
37
38
39
class RefrenzPage extends Page {
	static $db = array(
	);
	
	static $has_one = array(
		"PreviewImage" => "Image"
	);
	
	static $has_many = array(
		"RefImages" => "RefImage",
	);
	
	function getCMSFields() {
		$fields = parent::getCMSFields();
		
		$fields->addFieldToTab("Root.Content.Images", new ImageField('PreviewImage'));
		
		$refImageManger = new ImageDataObjectManager(
			$this,
			"RefImages",
			"RefImage",
			'Attachment',
			array (
				'Leistung' => 'Leistung',
			),
			'getCMSFields_forPopup'
		);
		
		$fields->addFieldToTab("Root.Content.RefImages", $refImageManger);
		
		return $fields;
		
	}
	
}

class RefrenzPage_Controller extends Page_Controller {
 
}