Esempio n. 1
0
 public function getUrl()
 {
     if (F::utf8_str($this->title) == '1') {
         $title = str_replace('/', '-', $this->title);
     } else {
         $pinyin = new Pinyin($this->title);
         $title = $pinyin->full2();
         $title = str_replace('/', '-', $title);
     }
     return Yii::app()->createUrl('article/view', array('id' => $this->article_id, 'title' => $title));
 }