Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ViewHelper for a user contact link #496

Closed
TiSiE opened this issue Nov 1, 2018 · 2 comments
Closed

ViewHelper for a user contact link #496

TiSiE opened this issue Nov 1, 2018 · 2 comments

Comments

@TiSiE
Copy link
Member

TiSiE commented Nov 1, 2018

We need a view helper that generates a contact link from a user entity.

$this->contactLink($user);

It should

  • generate a mailto: link with the email address and using the name as link content
    <a href="mailto:email@address.net">Fancy Name</a>
  • generate a mailto: link with the email address, if no name is present in the user entity.
    <a href="mailto:email@address.net">email@address.net</a>
  • generate a string consisting of the name, if no email-Address is available
    Fancy Name
  • generate an empty string, if no contact information whatsoever are available.

Probably useful

sergey-galenko added a commit to sergey-galenko/YAWIK that referenced this issue Nov 4, 2018
TiSiE added a commit that referenced this issue Nov 8, 2018
@TiSiE
Copy link
Member Author

TiSiE commented Nov 8, 2018

@sergey-galenko
It would be nice, if you can also create a unit test case for the new ViewHelper class

sergey-galenko added a commit to sergey-galenko/YAWIK that referenced this issue Nov 11, 2018
@sergey-galenko
Copy link
Collaborator

@TiSiE I added unit tests. Please review.

@TiSiE TiSiE closed this as completed Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants