>
> Where do we put this script ?
It's a controller method (though you could put it in a cake shell as
well). You could either stick it in an existing controller (say
users_controller as that will have the required models already) or
create a new one specifically for it.
hth
j
>
> var $components = array('Acl');
>
> function anyAction()
> {
> $aro =& $this->Acl->Aro;
>
> //Here's all of our group info in an array we can iterate through
> $groups = array(
> 0 => array(
> 'alias' => 'warriors'
> ),
> 1 => array(
> 'alias' => 'wizards'
> ),
> 2 => array(
> 'alias' => 'hobbits'
> ),
> 3 => array(
> 'alias' => 'visitors'
> ),
> );
>
> //Iterate and create ARO groups
> foreach($groups as $data)
> {
> //Remember to call create() when saving in loops...
> $aro->create();
>
> //Save data
> $aro->save($data);
> }
>
> //Other action logic goes here...
> ------------------------------
>
> Can someone point this out ?
>
>
> Thanks. Regards,
> Maxim
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>
--
jon bennett - www.jben.net - blog.jben.net
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment