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
<?php

class NormalColor extends DataObject {

	public static $db = array(
		'ColorName' => 'Text',
		'ColorCode' => 'Text',
		'ColorHexValue' => 'Text',
		'ColorRemarks' => 'Text'
	);

	public static $belongs_many_many = array(
		'NormalColorProductPages' => 'ProductPage'
	);

	function getCMSFields_forPopup() {
		$fields = new FieldSet();
		$fields->push( new TextField( 'ColorName', 'Color name' ) );
		$fields->push( new TextField( 'ColorCode', 'Color code' ) );		
		$fields->push( new TextField( 'ColorHexValue', 'HTML color - hexadecimal' ) );
		$fields->push( new TextField( 'ColorRemarks', 'Remarks' ) );
		return $fields;
	}

}
?>