Exemple #1
0
 /**
  * updateOne
  *
  * @param array $data
  * @return integer
  */
 public function updateOne($id, $data)
 {
     $id = (int) $id[0];
     \Application\MusicianType\Table::getInstance()->updateTypes($data['types'], $id);
     if (Session::get('image') != '') {
         $data['image'] = Session::get('image');
     }
     $result = parent::updateOne($id, $data);
     return $result;
 }
Exemple #2
0
 /**
  * getTypes
  * @return self
  */
 public function getTypes()
 {
     $types = \Application\MusicianType\Table::select()->select('mtypes.type, m.id, mtypes.id as type_id')->from('musician_type', 'musician_type')->innerJoin('musician_type', 'music_types', 'mtypes', 'musician_type.type_id = mtypes.id')->innerJoin('musician_type', 'musician', 'm', 'musician_type.musician_id = m.id')->where('musician_type.musician_id = ?', $this->id)->execute();
     return $types;
 }
Exemple #3
0
 public static function getAlltypes()
 {
     $alltypes = Table::getInstance()->getAllTypes();
     return $alltypes;
 }