Created
December 31, 2014 17:03
-
-
Save evercode1/dafa53b29ab8585d648d to your computer and use it in GitHub Desktop.
getUserLink and getUserIdLink Chap 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * get user id Link | |
| * | |
| */ | |
| public function getUserIdLink() | |
| { | |
| $url = Url::to(['user/update', 'id'=>$this->id]); | |
| $options = []; | |
| return Html::a($this->id, $url, $options); | |
| } | |
| /** | |
| * @getUserLink | |
| * | |
| */ | |
| public function getUserLink() | |
| { | |
| $url = Url::to(['user/view', 'id'=>$this->id]); | |
| $options = []; | |
| return Html::a($this->username, $url, $options); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment