public function renderAlias() { switch ($this->aliasType) { case 'email': return X2Html::renderEmailLink($this->alias); case 'phone': return X2Html::renderPhoneLink($this->alias); default: return CHtml::encode($this->alias); } }
public function renderAlias($makeLinks = true) { if ($makeLinks) { switch ($this->aliasType) { case 'email': return X2Html::renderEmailLink($this->alias); case 'phone': return X2Html::renderPhoneLink($this->alias); case 'googlePlus': return CHtml::encode($this->label ? $this->label : $this->alias); default: return CHtml::encode($this->alias); } } else { switch ($this->aliasType) { case 'googlePlus': return CHtml::encode($this->label ? $this->label : $this->alias); default: return CHtml::encode($this->alias); } } }