You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 14, 2018. It is now read-only.
I'm trying to change a field in one table. I want to show an image, but I can see only text. I've edited the DoctrineORMFieldGuesser.php adding theese lines:
case 'image':
$options[] = new FieldOptionGuess(
'image',
'WhiteOctoberAdminBundle::fields/image.html.twig',
FieldOptionGuess::HIGH_CONFIDENCE
);
$options[] = new FieldOptionGuess(
'formType',
'image',
FieldOptionGuess::LOW_CONFIDENCE
);
I have created this twig file:
<img
src="{{asset('pictures/media/'~value)}}"
alt="{{value}}" width="150px" />
I have changed the XAdmin.php file, too:
public function configureFieldsByAction(ActionInterface $action, FieldConfigurator $fieldConfigurator)
{
// selection action by name
if ('list' == $action->getName()) {
$fieldConfigurator->get('logo')->setOption('template','WhiteOctoberAdminBundle:fields:image.html.twig');
//$fieldConfigurator->get('logo')->setOption('label', '...');
// changing options
// $fieldConfigurator->get('linkViewMore')->setOption('label', '...');
}
}
Anyone could help me? I can't see images :s I see only the source code: "".