Iimplement ACL plugin in cakephp 3

2015-05-04 Thread Sunil Kumar
I need to implement ACL plugin in cakephp 3 . the documentation given 
is not helping ... need your help in implementing the same.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Where to create common functionalities with view in cakephp?

2015-05-04 Thread heavyKevy

As Lorenzo mentioned you may need to use a plugin and in that it is 
included in most pages, you will likely need to put the code in an element.
If it is simple, you may want to just load/use the model(s)/table(s) 
required in your app controller and use the element where needed to show 
your component.
You should be able to find what you need in the documentation... 
http://book.cakephp.org/3.0/en/contents.html  you can find the elements 
under the view topic.
--Kevin

On Sunday, May 3, 2015 at 6:14:51 PM UTC+7, Abhinav Pathak wrote:

 I am new in cakephp. I have a module with name contact us in 1 of my 
 project. This module need to show on almost all pages of the website. So my 
 question is, for this common module can we create component or there is 
 some other way to complete it? I read about the components for the site and 
 found that components does not have own views. Please suggest me how can we 
 do this?


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Iimplement ACL plugin in cakephp 3

2015-05-04 Thread John Andersen
Please provide more information on what you have tried and what are the 
issues you are facing!

Do you understand about creating a plugin in CakePHP 3?
Have you an understanding of ACL?

How far are you with the plugin and where are you stuck?

Enjoy, John

On Monday, 4 May 2015 10:58:46 UTC+3, Sunil Kumar wrote:

 I need to implement ACL plugin in cakephp 3 . the documentation given 
 is not helping ... need your help in implementing the same.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Iimplement ACL plugin in cakephp 3

2015-05-04 Thread InYan
Keep the author. It would be ideal to make a video tutorial!

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


CakePHP 1.3 - ClassRegistry::init('Model')/loadModel() constructs EVERY related model (multiple times) too?!

2015-05-04 Thread DigitalDude
Hey guys,

I'm wondering if anyone has a clue on this one, but I need to check if this 
is the standard behavior or not in CakePHP 1.3.

Let's say I want to create a model anywhere in my app. Besides a lot of 
other options, I could do this with:

$Post = ClassRegistry::init('Post');

When I trace the call stack of my function, I see that cake invokes EVERY 
related model (via belongsTo, hasMany etc.). And it is doing it recursive, 
so when I hit a second related model with a back-connection to the first 
model, it constructs them another time all the way trough.

I have an app on Cake 1.3 with about 150 models, which are nearly all 
related to each other via model-paths/associations. When I trace the call 
stack and check what models get constructed, it will end up in constructing 
nearly 600 (!) model-classes (some models are instantiated at least 35 
times).


I checked this with Cake 2, and it behaves completely different. Only the 
models targeted within finds or accessing data from other models, those 
models are instantiated. The only thing I know of for the moment is 
removing those relations and use on-the-fly bind/unbind within all actions, 
but this would be a hell lot of work to do (and easier to migrate the whole 
app to cake2).

So my question is:

Is this normal for CakePHP 1.3 to create ALL related models/classes as 
well? Did anyone of you had similar problems when the app grew and you had 
more than 100 models? I'm really sure I setup all relations correctly and I 
already tested a lot if there is any wrong relation that might cause a 
recursion loop...

Maybe it's time for splitting the app into smaller services to avoid those 
complex relations and recursions...

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.