Ok.never mind. I got the answer to that. Rummaging through the
documentation I found out this
> If you ever need to use a helper outside a template, you can still
> load a helper group from anywhere by calling
> sfProjectConfiguration::getActive()->loadHelpers($helpers),
> where $help
Just one more question this was keeping in mind that I want to use
functions in my template. That's where helpers come in. What if I want
to use some functions in controller? inside my actions? inside
actions.class.php or components.class.php ? What happens then?
Thanks and Regards
Vikram
On
On Tue, 17 Feb 2009, SeeVik wrote:
> Ok Alexander.
>
> I will try those things. Thanks a lot for your help.
http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_sub_helpers
--
--~--~-~--~~~---~--~~
You received this message because yo
If you are using those functions within a view they really should be helpers
and should be located inside of /app/frontend/lib/helper directory and
should also be named with Helper.php at the end so myFunctionsHelper.php is
what they should be called. Then in the view you want to use them in you ca
Ok Alexander.
I will try those things. Thanks a lot for your help.
Vikram
On Feb 17, 4:46 pm, Alexandru-Emil Lupu wrote:
> you might have 2 options:
> insert all those stuff in some classes as static methods
> either you make a Helper usually "[any of your]lib/helper/yourHelper.php"
> an load
you might have 2 options:
insert all those stuff in some classes as static methods
either you make a Helper usually "[any of your]lib/helper/yourHelper.php"
an load it with "sfLoad::helpers(array())" if i recall right ...
On Tue, Feb 17, 2009 at 4:57 AM, SeeVik wrote:
>
> Here are the contents
Here are the contents of the file that I put in lib folder.
/apps/$app_name/lib/myFunctions.php
-
wrote:
> I put the file in the folder apps/$app_name/lib/ . I named the file
> myFunctions.php. Yes I cleared the cache and I am u
I put the file in the folder apps/$app_name/lib/ . I named the file
myFunctions.php. Yes I cleared the cache and I am using dev
controller.
On Feb 17, 11:47 am, Eno wrote:
> On Mon, 16 Feb 2009, SeeVik wrote:
> > Yes James. I eventually found that out. Now I have created a php file
> > which ac
On Mon, 16 Feb 2009, SeeVik wrote:
> Yes James. I eventually found that out. Now I have created a php file
> which acts like a repository of functions. But the module where I am
> calling these functions are not able to locate them. Is there a need
> of doing some include or import or something l
Yes James. I eventually found that out. Now I have created a php file
which acts like a repository of functions. But the module where I am
calling these functions are not able to locate them. Is there a need
of doing some include or import or something like that?
Thanks and Regards
Vikram
On Feb
that is what the "lib" directory is for.
If you want all applications to see them then it's
sf_root_dir/lib/yourstuff
If only a specific application
sf_root_dir/apps/frontend/lib/yourstuff
If only a specific module
sf_root_dir/apps/frontend/modules/mymodule/lib/yourstuff
You should read "th
Also where can I put my classes? Like if I create some php classes and
interfaces, in which folder should I place them in Symfony directory
structure?
Thanks and Regards
Vikram
On Feb 17, 9:43 am, SeeVik wrote:
> hello all,
>
> I have a code snippet in php that I want to be accessible to all th
12 matches
Mail list logo