In Controllers you can do something else with phpDoc, like: /** * @var Model */ var $model;
If you put this in your AppController, it should work in every action in your controllers. This all works for me with PDT Eclipse. On 11 Okt., 14:29, wluigi <[EMAIL PROTECTED]> wrote: > That's great. > > So in the controller, you can use > > if(false) { > $this->Model = new Model(); > > } > > but you've to add this in every action of every controller. > > How to add it to one and only one place ? > > On Oct 10, 9:34 pm, Stu <[EMAIL PROTECTED]> wrote: > > > > > That is brilliant, and worked flawlessly first time, and just makes > > something awesome even more awesome. > > > Thanks very much > > > Stu > > > On Oct 10, 7:14 pm, schneimi <[EMAIL PROTECTED]> wrote: > > > > You can put it in the index.php and it works for every view. :-) > > > > schneimi schrieb: > > > > > I just tested this code in a view: > > > > > if(false) { > > > > $html = new HtmlHelper(); > > > > } > > > > > Not that beautiful, but it will never be executed and Eclipse does the > > > > completion anyway. Maybe that helps. > > > > > Michael > > > > > Not very beautiful but will never run and > > > > voidstate schrieb: > > > > > But the names are standardised. Could you perhaps put some kind of > > > > > alias for the helper objects in the app during development using those > > > > > names then remove them for production? > > > > > > On Oct 8, 9:53 pm, schneimi <[EMAIL PROTECTED]> wrote: > > > > > > Yes that would be nice, but i think it's not possible, because these > > > > > > variables are handled by cake. > > > > > > > Stu schrieb: > > > > > > > > Well, I unfortunately can't get code completion on methods in > > > > > > > $form->, > > > > > > > or $html-> in a view (*.ctp file). > > > > > > > > It's no big deal, but it would be very nice. > > > > > > > > On Oct 8, 1:58 pm, schneimi <[EMAIL PROTECTED]> wrote: > > > > > > > > Yes, you are right, the second step is not necessary. > > > > > > > > > Stu schrieb: > > > > > > > > > > Ah ok, I'd done the first step but not the second step. I'm > > > > > > > > > at work at > > > > > > > > > the moment, but I'll do the second step when I get home. > > > > > > > > > > Thanks > > > > > > > > > > On Oct 7, 5:28 pm, schneimi <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Hi, > > > > > > > > > > > You have to do two steps: > > > > > > > > > > > - Add *.thtml to Preferences->General->Content Types->PHP > > > > > > > > > > Content > > > > > > > > > > Type > > > > > > > > > > - Add *.thtml and assign the PHP-Editor in > > > > > > > > > > Preferences->General- > > > > > > > > > > > >Editors->File Associations > > > > > > > > > > > regards, > > > > > > > > > > > Michael > > > > > > > > > > > Stu schrieb: > > > > > > > > > > > > Hi Bakers, > > > > > > > > > > > > Does anyone know if it is possible to get code completion > > > > > > > > > > > working for > > > > > > > > > > > Views in eclipse? I've got it working for Models in a > > > > > > > > > > > controller, but > > > > > > > > > > > can't seem to get any code completion when in a View, and > > > > > > > > > > > do something > > > > > > > > > > > like <div><?php echo $html->.... I'm just wondering if > > > > > > > > > > > there is some > > > > > > > > > > > configuration option I'm missing or something like that. > > > > > > > > > > > > Any help would be appreciated, > > > > > > > > > > > > thanks > > > > > > > > > > > > Stu- Zitierten Text ausblenden - > > - Zitierten Text anzeigen - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---