CakePHP Helper Auto-Completion in Netbeans 6.8 - cakephp

Can anyone please tell me how I can "enable" CakePHP's Helper auto-completion in CakePHP? Essentially so when, for instance, I type $form-> it gives me a list of $form's methods and variables.
I have read http://bakery.cakephp.org/articles/view/model-based-code-insight-and-completion-in-netbeans and also tried to implement comment #3. When I try that it still fails to auto complete in either a Controller or View.
Do any Netbeans & CakePHP users out there have any tips, tricks, or hacks that can get this working? Thanks!

You can enable almost full support for CakePHP in NetBeans 6.8 just try this http://www.tiplite.com/cakephp-support-in-netbeans/

In Netbeans 6.8 there is a confirmed bug that makes the "comment #3"-method not working.
http://netbeans.org/bugzilla/show_bug.cgi?id=180239
It seems to be resolved in version 6.9. Haven't confirmed it myself, though.

Related

Datatable Plugin for CakePHP 4

I have been upgrading my application from cakephp 3 to cakephp 4. I was using fheider/cakephp-datatables and I have come across ypnos-web/cakephp-datatables where both support cakephp 3.
I am currently looking for a cakephp-datatable plugin which supports cakephp 4.
If anybody has an idea, I would be happy.
Thanks in Advance.
Isn't the built-in pagination is what you are looking for ? you can do advanced dynamic database links with your HTML tables.
I successfully use ypnos-web/cakephp-datatables on CakePHP 4.2.7. It works very well for me.
You might have to play around a bit to get it working correctly. Read some of the issues (open and closed) on the ypnos-web/cakephp-datatables github repository and you can likely get it working.
Good Luck!

CakePHP 3 and ACL plug in

I am trying to make a simple ACL using CakePHP 3, and there are no tutorials for it in the cook book (only for cakephp 2 and now acl doesn't exist in cakephp3)
Question 1
I am trying to install the acl plugin from https://github.com/cakephp/acl, how may I do that?
Question 2
Is there any comprehensive and beginner friendly tutorial on how to make an ACL on CakePHP3? I've trying searching everywhere, but found nothing. If anyone could guide me on how to do a simple one it would be much appreciated.
Many thanks
USE cakephp-3acl-example project to creating permission and granding permission for users
https://github.com/mattmemmesheimer/cakephp-3-acl-example
Question 1 I am trying to install the acl plugin from https://github.com/cakephp/acl, how may I do that?
Like any other plugin? See the documentation.
The readme.md itself contains instructions as well but also a warning:
Note: This is a non-stable plugin for CakePHP 3.0 at this time. It is
currently under development and should be considered experimental.
Maybe try it and provide feedback to the developers?
Question 2 Is there any comprehensive and beginner friendly tutorial on how to make an ACL on CakePHP3? I've trying searching everywhere, but found nothing.
If anyone could guide me on how to do a simple one it would be much appreciated.
ACL is always the same, if you know how ACL works you can implement it in any language and framework. If you don't know how, read about how ACL in general works.
But a better idea might to simply use the plugin you already found and help testing and completing it if you encounter issues.
burzum is correct that the installation instructions and documentation are available at https://github.com/cakephp/acl .
I am cutting over from a 1.3 implementation so have not gone through setting up a new acl database.
I have not seen a comprehensive doc on how to setup ACL, the 'short' version I have in my notes is:
1) setup 'Auth' as per the blog example (yes Auth is not ACL but this is what I am using it for)
2) install ACL using composer
3) override 'isAuthorized' in AppController with a check like:
...
use Acl\Controller\Component\AclComponent;
use Cake\Controller\ComponentRegistry;
...
public function isAuthorized($user){
$Collection = new ComponentRegistry();
$acl= new AclComponent($Collection);
$username=$user['username'];
$controller=$this->request->controller;
$action=$this->request->action;
$check=$acl->check($user['username'],"$controller/$action");
return $check;
}
You can follow this plugin.
CakePhp3-AclManager
And the tutorial (step by step) here
If you don't know Japan language, use google translate.
Good luck.

Which plugin I should use for db migration for hibernate4?

I am using grails2.3.7 and hibernate4.
However, the default database-migration plugin is not working with hibernate4.
Is there any other plugin that can do the same thing but support hibernate4?
Thanks.
Depending on what functionality you can do without, you may be able to use straight Liquibase in your project. It is fairly simple to setup. You could use the manual or a presentation I gave to get yourself started.
You can always look at the source of the database-migration plugin to give you clues about how to set it up if you get stuck.
The plugin is updated to support hibernate4 now.
database-migration

Enabling ExtJS code completion with IntelliJ IDEA

How do I enable auto-complete/code completion feature of IntelliJ IDEA to work with ExtJS javascript library?
Thanks
This could probably be closed as a dup of this question:
Add ExtJS code assist to IntellijIDEA
The answer is here:
http://blogs.jetbrains.com/webide/2010/11/working-with-javascript-libraries-in-phpstorm-webstorm/
do you have the extjs javascript files in your project? I find that when I do Intellij is somewhat good at getting methods, but it doesn't always get all the available methods. I thinks its just a gotcha of dynamic languages -- an IDE can't know all the methods available because some are available only at runtime...

Is there any IDE that has code-hinting for CakePHP or any code-hinting package that can be installed somehow?

Question says it all...
You can get this functionality in Netbeans as described in this article from the bakery.
http://bakery.cakephp.org/articles/view/model-based-code-insight-and-completion-in-netbeans
You can also do the same thing in Eclipse PDT or Aptana.
http://mark-story.com/posts/view/code-completion-for-cakephp-in-eclipse
All of these IDEs are free. Although they are both
Updating
Now netbeans has a plugin for CakePHP.
It is not an IDE, but if you are a textmate user, then there is a bundle for CakePHP: http://thechaw.com/cakephp_tmbundle
PHPed by Nusphere works great. They've even posted an excellent article to help get it all set up.
Komodo Edit has a CakePHP addon and a macro to ease MVC navigation.
It is built on the Mozilla code base so is similarly extensible through addons, has equivalent memory consumption/speeds, and is licensed under the same terms.
Nearly forgot to mention, it is also cross-platform.

Resources