forked from omeka/Omeka
/
ItemRelationsRelation.php
48 lines (42 loc) · 1009 Bytes
/
ItemRelationsRelation.php
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
40
41
42
43
44
45
46
47
48
<?php
/**
* Item Relations
* @copyright Copyright 2010-2014 Roy Rosenzweig Center for History and New Media
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU GPLv3
*/
/**
* Item Relations Relation model.
*/
class ItemRelationsRelation extends Omeka_Record_AbstractRecord
{
/**
* @var int
*/
public $id;
/**
* @var int
*/
public $subject_item_id;
/**
* @var int
*/
public $property_id;
/**
* @var int
*/
public $object_item_id;
/**
* Get a textual representation of the property for this relation.
*
* @uses ItemRelationsProperty::getText()
* @return string
*/
public function getPropertyText()
{
$property = new ItemRelationsProperty;
$property->local_part = $this->property_local_part;
$property->label = $this->property_label;
$property->vocabulary_namespace_prefix = $this->vocabulary_namespace_prefix;
return $property->getText();
}
}