Symfony include_component() with components from a plugin

Posted by Chris T on Stack Overflow See other posts from Stack Overflow or by Chris T
Published on 2010-05-16T15:41:50Z Indexed on 2010/05/16 15:50 UTC
Read the original article Hit count: 549

Filed under:
|
|

All I'd like to do is use include_component to call a component from a plugin that I'm developing

<?php
    #/plugins/fooPlugin/modules/barModule/actions/components.class.php
    class barModuleComponents extends sfComponents{
     /**
      * Constructor
      */
     function __construct(){

     }
     function executeHello(){

     }
    }
?>

and

<!-- /plugins/fooPlugin/modules/barModule/templates/_hello.php -->
<p>HELLO WORLD!</p>

But it won't load if I do this in

#/apps/frontend/modules/homepage/templates/indexSuccess.php
<?php
include_component("barModule", "hello");
?>

XDebug gives me:

( ! ) Fatal error: Call to a member function add() on a non-object in C:\Program Files\WaterProof\PHPEdit\3.6.2\Extensions\Symfony\distribution\1.4\lib\helper\PartialHelper.php on line 360

© Stack Overflow or respective owner

Related posts about php

Related posts about symfony