summaryrefslogtreecommitdiff
path: root/trunk/reprap/web/part-lister/models/legendpart.php
blob: 6893a05044e700446c96b2cc4eef719ef7a093f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?
	class LegendPart extends Model
	{
		public function __construct($id = null)
		{
			parent::__construct($id, "legend");
		}

		public static function getModules($status)
		{
			$sql = "
				SELECT id, unique_part_id
				FROM legend
				WHERE status = '{$status}'
				ORDER BY id
			";
			
			return new Collection($sql, array(
				'LegendPart' => 'id',
				'UniquePart' => 'unique_part_id'
			));
		}
	}
?>