Last active
August 29, 2015 14:12
-
-
Save evercode1/8f6678efd12440c6366f to your computer and use it in GitHub Desktop.
User Profile Relations Cahp 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
| /** | |
| * @getProfileId | |
| * | |
| */ | |
| public function getProfileId() | |
| { | |
| return $this->profile ? $this->profile->id : 'none'; | |
| } | |
| /** | |
| * @getProfileLink | |
| * | |
| */ | |
| public function getProfileLink() | |
| { | |
| $url = Url::to(['profile/view', 'id'=>$this->profileId]); | |
| $options = []; | |
| return Html::a($this->profile ? 'profile' : 'none', $url, $options); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment