aboutsummaryrefslogtreecommitdiff
path: root/mod/lightbox/classes/LightboxPluginAlbum.php
blob: de272d981f7d95d7bc33eb4acbe8665b4edf20f8 (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
25
26
27
28
29
30
31
<?php

/**
 * Override the ElggObject
 */
class LightboxPluginAlbum extends ElggObject {
	protected function  initializeAttributes() {
		parent::initializeAttributes();

		$this->attributes['subtype'] = "album";
	}

	public function __construct($guid = null) {
		parent::__construct($guid);
	}
	
	public function attachImages($images) {
		foreach($images as $image) {
			if($image instanceof LightboxPluginImage) {
				$this->addRelationship($image->guid, 'in_album');
			} else {
				return false;
			}
		}
		return true;
	}

	public function delete() {
		return parent::delete();
	}
}