Esempio n. 1
0
 /**
  * Create as we need to build the paper name if one doesnt exist. 
  */
 public function get()
 {
     $results = parent::get();
     // we have the results, we now need to go through and build the names up
     for ($i = 0; $i < count($results); $i++) {
         if ($results[$i]['name'] == NULL) {
             $collection = orm::factory('collection')->find($results[$i]['collection_id']);
             $results[$i]['name'] = $collection->paper->name . ' ' . $collection->finish->name . ' ' . ucwords($results[$i]['color']);
         }
     }
     return $results;
 }