Re: Controller Name in App_controller

2010-08-04 Thread Amit Rawat
Hi

You can get controller name and action name by:-

$this-params['controller'] and $this-params['action']

Enjoy,

Amit

On Wed, Aug 4, 2010 at 1:19 PM, Ambika Kulkarni
ambikakulkarn...@gmail.comwrote:

 Hi all,

 Is their any way to get the controller name in app_controller.php
 file.

 The problem scenario is like this.

 In my app_controller i have written a bunch of code in before_filter()
 function.

 I have a right panel like
 Division
 Element
 Purchase and so on...

 As soon as I click on any of this name (Division or Element ...) then
 I want the respective controller name in the before_filter() function.
  For Division link the  controller name is divisions. As soon as I
 click in Divisions link I am redirected to divisions_controller.php
 page.

 Please help me out to solve this prob

 Thanks and Regards
 Ambika

 Check out the new CakePHP Questions site http://cakeqs.org and help others
 with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Controller Name in App_controller

2010-08-04 Thread Ambika Kulkarni
yes, got it.

Thank you
On Wed, Aug 4, 2010 at 2:18 PM, Amit Rawat rawatami...@gmail.com wrote:

 Hi

 You can get controller name and action name by:-

 $this-params['controller'] and $this-params['action']

 Enjoy,

 Amit

 On Wed, Aug 4, 2010 at 1:19 PM, Ambika Kulkarni 
 ambikakulkarn...@gmail.com wrote:

 Hi all,

 Is their any way to get the controller name in app_controller.php
 file.

 The problem scenario is like this.

 In my app_controller i have written a bunch of code in before_filter()
 function.

 I have a right panel like
 Division
 Element
 Purchase and so on...

 As soon as I click on any of this name (Division or Element ...) then
 I want the respective controller name in the before_filter() function.
  For Division link the  controller name is divisions. As soon as I
 click in Divisions link I am redirected to divisions_controller.php
 page.

 Please help me out to solve this prob

 Thanks and Regards
 Ambika

 Check out the new CakePHP Questions site http://cakeqs.org and help
 others with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com

 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en


  Check out the new CakePHP Questions site http://cakeqs.org and help
 others with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com

 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: controller name

2007-07-28 Thread citrus

I think your problem can be solved by editting inflections.php, which
is located in app/config directory. To be more precisely, add niche -
niches to your $irregularPlural array like this:

$irregularPlural = array('niche' = 'niches');

It would work seamlessly then.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: controller name

2007-07-28 Thread Andras Kende


Both  $irregularPlural = array('niche' = 'niches');   or var $uses =
array('Niche');  works great

Thanks for the help  !!!

Andras


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: controller name

2007-07-27 Thread RoE

Hello Andras,

Try to declare $uses variable inside your controller somewhat like
below.

.
.
class NichesController extends AppController {
   var $name = 'Niches';

   var $uses = array('Niche');

   var $scaffold;
}


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: controller name (s)

2007-07-12 Thread francky06l

You can your own rules for this into the inflections.php in your
config directory.

On Jul 12, 4:11 pm, Dragos Rusu [EMAIL PROTECTED] wrote:
 I'm using other language for controller names and I don't know how to
 escape the s separator.
 I'd like to use as controller name the following word: 'anunturi' .
 Where do I set the connection between model - controller - view ?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---