We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, I wanted to show image of user in datagrid, however Image::createLink method returns path without the $basePath variable.
Image::createLink
$basePath
public function columnName(User $user): Html { $presenter = $this->getPresenter(); $basePath = $presenter->getHttpRequest()->getUrl()->getBasePath(); // Avatar $image = $this->imageStorage->fromIdentifier($user->getImage()); $avatar = Html::el('img class="img-fluid img-circle mr-2" width="24px" alt="'.$user.'"') ->setSrc($basePath.$image->createLink()); // Link $link = $presenter->lazyLink('User:edit', $user->getId()); $name = Html::el('a')->setHref($link)->addHtml($avatar) ->addText($user->getName()); return $name; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I wanted to show image of user in datagrid, however
Image::createLink
method returns path without the$basePath
variable.The text was updated successfully, but these errors were encountered: