I have an unusual task at hand, I just need to import a specific portion of CakePHP framework in my custom MVC project, i.e HTML helpers.
Can anyone tell me what code libraries from CakePHP do I need to transfer into my project , to do this.
Please note I need only HTML helpers from the CakePHP framework.
Thanks.
Just go to the CakePHP Github repository Helper directory and download them: https://github.com/cakephp/cakephp/tree/master/lib/Cake/View/Helper
Related
As mentionned in the title I want to use angularJS with Symfony1.4.
Is that possible? and How to integrate this framework with Symfony1.4?
Of course you can.
If you are familiar with AngularJS you should now that the important things to be considered is to import correctly the script files, and to declare correctly your app and controller.
The same has to be done in Symfony, importing scripts and declaring Angular app.
I'm actually using it, and it works great.
you dont need integrate Angular with Symfony because Angular is a Javascript framework (client) and Symfony its a PHP Framework (Server). simply you can make a API with symfony a simple static entry point for start the angular application and use the API from the Angular App
Im working with cakephp for few months and recently I came across croogo, a cakephp cms system. I've tried it and I should say its an awesome system.
Is it possible to use it as a plugin in my main site. I want to use it just for the admin part and rest of my application unattached to it. Ive tried loading its bootstrap file from my main app and also by linking routes to it. I always get errors.
Can someone have any idea if croogo is meant to be used like a plugin or does it have to be used seperately?
"Beginning version 1.6.x, Croogo has been updated to be installed as a vendor package"
=> So yes, it is possible to use it in your code - just not as plugin, but vendor.
See
https://github.com/croogo/croogo/tree/3.0#installation-using-git
I've developed a bug tracker using CakePHP 2.4.4. I made this as a standalone cakephp app but now I wanna transfer it to a plugin, in order to reuse it in other projects.
As I already read at the docs (http://book.cakephp.org/2.0/en/plugins.html), I have followed the instructions from there and created the correct folder and files structure. This is what i've done so far: https://github.com/lubbleup/BugCake/tree/plugin
But now,when i try to use the plugin in a separate cakephp installation, I cannot understand how to make of the plugin and, for example, use it's controllers and functionality etc.
can anyone help me out here?
ps:this is my first time trying to create a cakephp plugin
Thank you in advance!
You have to load the plugins your parent app in APP/Config/bootstrap.php
CakePlugin::loadAll();
You do not need AppModel or AppController in your plugin. Your plugin has an own AppController/-Model named PluginNameAppController/PluginNameAppModel.
You can call your plugin at http://host/plugin_name/controller/action/[...]. In your case http://host/bug_cake/issues/view/1 for instance.
But you can also use custom routes in your plugin with plenty of options.
Hope that answers your question—if not, comment.
I am using cakephp 2.x to make one site multilingual and I am using the i18n extract and the TranslateBehavior Core Library.
The i18n works fine and the TranslateBehavior Core Library works fine when I try to save data. But when I want to read it I have to say to the controller the specific locale with:
$this->Home->locale = 'spa';
or
$this->Home->locale = 'eng';
Instead the core library makes it automatically by me. I have to specify all the times the locale? Or does exist something that do it automatically?
Thank you very much
There is a detailed article about i18n on Cakephp 1.3, I hope your 2.x will also work on this say theory so you can have a try with that http://codeatomic.com/developing-cakephp-multilingual-website/
I am working on a project based on cakePHP 1.2.5. Now I need to use new JS helper defined in cakePHP 1.3.7.
I want to use some methods of JS helper like $this->Js->buffer("some code"),
$this->Js->writeBuffer()...
Is it possible to include this JS helper only to cakePHP 1.2.5? and How?
Thanks
I don't think you can because the basic way of calling the class has changed. In 1.2.5 the helper classes were not attached to the $this object in your view.
I think the better question would be to see if you can upgrade from 1.2 to 1.3. What are the requirements keeping you from upgrading, if any.
I would update your project to the current version of cakephp. A lot of bugs were fixed and other things were optimized.
But you can use the normal php or javascript functions...or build your own methods to solve your problem...
You could try to copy the JsHelper and its dependencies (HtmlHelper, FormHelper, and the engine helper for the Javascript framework you use) to the helpers folder of your application, though I don't know whether this will work...
However, even if this should work it is a hack, and I would consider to upgrade to CakePHP 1.3.x or to write your own helper providing the desired functionality.