1 <?php
2
3 4 5 6 7 8 9 10
11
12 13 14 15 16 17
18 class P3MediaMeta extends BaseP3MediaMeta {
19
20
21 public static function model($className = __CLASS__) {
22 return parent::model($className);
23 }
24
25 public function init() {
26 return parent::init();
27 }
28
29 public function __toString() {
30 return (string) $this->type;
31 }
32
33 public function behaviors() {
34
35
36 $return = array_merge(
37 array(
38 'MetaData' => array(
39 'class' => 'P3MetaDataBehavior',
40 'metaDataRelation' => '_self_',
41 'childrenRelation' => 'p3MediaMetas',
42 'parentRelation' => 'treeParent',
43 'contentRelation' => 'id0'
44 )
45 ), parent::behaviors()
46 );
47
48 return $return;
49 }
50
51 public function rules() {
52 return array_merge(
53
54 parent::rules()
55 );
56 }
57
58 public function get_label() {
59 return $this->id0->title;
60 }
61
62 }
63