Exemple #1
0
 /**
  * Reescrito função de obter notícias
  * Traz junto as:
  *  imagens;
  *  e se for site_id = 1 traz também:
  *  categorias;
  *
  * @param integer $id - Código da notícia
  * @return array
  */
 function obter($id)
 {
     $noticia = parent::obter($id);
     $noticia['imagens'] = $this->obter_imagens($id);
     $noticia['categorias_ids'] = $this->obter_categorias($id);
     return $noticia;
 }
Exemple #2
0
 function obter($id = '', $columns = array())
 {
     if (strlen($id) == 0) {
         $id = $this->session->userdata('usuario_id');
     }
     return parent::obter($id, $columns);
 }