Exemple #1
0
 public function getItemType()
 {
     if ($this->_item_type) {
         return $this->_item_type;
     }
     $db = $this->db;
     $item_type = new Dase_DBO_ItemType($db);
     if ($this->item_type_id) {
         $item_type->load($this->item_type_id);
     } else {
         $item_type->name = 'default';
         $item_type->ascii_id = 'default';
         $item_type->collection_id = $this->collection_id;
     }
     $this->_item_type = $item_type;
     return $item_type;
 }
Exemple #2
0
 function getItemTypes()
 {
     $item_types = array();
     $att_it = new Dase_DBO_AttributeItemType($this->db);
     $att_it->attribute_id = $this->id;
     foreach ($att_it->find() as $ait) {
         $it = new Dase_DBO_ItemType($this->db);
         $it->load($ait->item_type_id);
         $item_types[] = $it;
     }
     $this->item_types = $item_types;
     return $item_types;
 }