You should use it as a plugin... that's the right way since it IS a CakePHP plugin.
There's no need to you get the behavior and inject it in your app (like in app/Model/Behaviors).
Just:
/project/$ git submodule add url-to-repo app/Plugin/StateMachine
and then init the behavior as $actsAs => "StateMachine.StateMachine"
That's correct! :)
--
Thiago Belem
Desenvolvedor
Rio de Janeiro - RJ - Brasil
Thiago Belem
Desenvolvedor
Rio de Janeiro - RJ - Brasil
Assando Sites - Curso online de CakePHP
assando-sites.com.br
thiagobelem.net
contato@thiagobelem.net
Skype / gTalk » thiago.belem.web
LinkedIn » br.linkedin.com/in/thiagobelem/pt
thiagobelem.net
contato@thiagobelem.net
Skype / gTalk » thiago.belem.web
LinkedIn » br.linkedin.com/in/thiagobelem/pt
On Fri, Feb 8, 2013 at 6:49 PM, Vanja Dizdarević <lex.non.scripta@gmail.com> wrote:
I wish to add a behavior (for example Finite state machine) to a project.
I would like to use Git submodule functionality, but it seems impossible due to repo folder structure.
If I do (example):
/project/$ git clone url-to-repo app/Model/Behavior/StateMachine
I would end up with /project/app/Model/Behavior/StateMachine/Model/Behavior/StateMachineBehavior.php
Checking out the repo as a plugin might work?
/project/$ git submodule add url-to-repo app/Plugin/StateMachineand then init the behavior as $actsAs => "StateMachine.StateMachine"--
But I'm not sure if this is good practice...
How would you guys do this?
(The same goes for Components and Helpers)
P.S.: I know that it's easier to just download the file and put it in app/Behaviors, but I am making a deployment version for many different projects and it's crucial to be able to checkout updates later via git.
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+unsubscribe@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
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+unsubscribe@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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment