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

Add image form type #130

Merged
merged 1 commit into from
Jan 9, 2013
Merged

Add image form type #130

merged 1 commit into from
Jan 9, 2013

Conversation

EmmanuelVella
Copy link
Contributor

Displays a file input with an imagine thumbnail. Only image_path and image_filter options are mandatory.

 ->add('image', 'liip_imagine_image', array(
    'image_path' => '/uploads/my-image.jpg',
    'image_filter' => 'my_thumb',
    'image_attr' => array('class' => 'thumbnail'),
    'link_url' => '/uploads/my-image.jpg'
    'link_attr' => array('class' => 'link')
))

I often need this and I think it would be nice to make it available in the bundle.

@Nelrann
Copy link

Nelrann commented Jan 9, 2013

+1 :)

@@ -55,5 +55,9 @@ public function load(array $configs, ContainerBuilder $container)
}

$container->setParameter('liip_imagine.cache.resolver.base_path', $config['cache_base_path']);

$resources = $container->hasParameter('twig.form.resources') ? $container->getParameter('twig.form.resources') : array();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the standard pattern for adding form resources in other Bundles too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, it's done like that in the SymfonyCmfRoutingExtraBundle too. That is the only way i know. Do you know a better one ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see .. i dont know .. i was just wondering :)

/cc @bschussek

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok ;)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah @lsmith77, do you know a better one? :P (which translates to I don't know either)

lsmith77 added a commit that referenced this pull request Jan 9, 2013
@lsmith77 lsmith77 merged commit 5567a0f into liip:master Jan 9, 2013
@EmmanuelVella EmmanuelVella deleted the image-type branch January 9, 2013 15:46
@EmmanuelVella
Copy link
Contributor Author

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants