probleme d'affchage de template Symfony2

17 views
Skip to first unread message

saikou ba

unread,
Jul 21, 2013, 9:47:33 AM7/21/13
to pommp...@googlegroups.com
Hello, I try to view my template to address:
I have this error

RuntimeException: The autoloader expected class "Sonata \ AdminBundle \ Validator \ Constraints \ InlineConstraint" to be defined in file The file was found purpose the class was not in it, the class name or namespace probably HAS typo.

my ProductRendrerer
  public function renderDescription (Product $ product)
     {
         return $ this-> minify ($ this-> render ('edsPbBundle: ProductRendererController: description2.html.twig', array ('product' => $ product)));
     }

My ProductRendererController:

<? php
namespace eds \ PbBundle \ Controller;

use eds \ PbBundle \ Renderers \ ProductRenderer;
use Symfony \ Bundle \ FrameworkBundle \ Controller \ Controller;
use Sensio \ Bundle \ FrameworkExtraBundle \ Configuration \ Route;
use Sensio \ Bundle \ FrameworkExtraBundle \ Configuration \ Template;

/ / I include the namespace product.php
use eds \ PbBundle \ Entity \ Product;
use eds \ PbBundle \ Entity \ DescriptionBlock;
use Symfony \ Component \ HttpFoundation \ Response;

ProductRendererController class extends Controller
{
     / **
      * @ Return ProductRenderer
      * /
     getProductRenderer private function ()
     {
         return $ this-> container-> get ("eds.pb.product_renderer");
     }

     public function descriptionAction ($ id_product)
     {
         $ repository = $ this-> getDoctrine ()
             -> GetManager ()
             -> getRepository ('edsPbBundle: Product');

         $ product = $ repository-> find ($ id_product);

         if (null == $ product) {
             throw $ this-> createNotFoundException ('Product [id ='.. $ id_product '] does not exist.');
         }

         return new Response ($ this-> getProductRenderer () -> renderDescription ($ product));
     }

}

Grégoire Hubert

unread,
Jul 22, 2013, 7:22:55 AM7/22/13
to pommp...@googlegroups.com
Hi,

I do not understand. Do you have a problem using Pomm ?


--
You received this message because you are subscribed to the Google Groups "PommProject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pommproject...@googlegroups.com.
Visit this group at http://groups.google.com/group/pommproject.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Grégoire HUBERT
Pomm non ORM http://pomm.coolkeums.org
Reply all
Reply to author
Forward
0 new messages