Skip to content

PHPStorm plug-in workshop #2

Description

@garethellis36

Just noting down some ideas for a plugin I want to develop out of @ascii-soup 's proposed work-shop.

CakePHP plugin (update CakeStorm?)

  • Add auto-complete support for App::uses() calls
  • Similarly, add support for automatically adding an App::uses() call to top of PHP file when a class is instantiated or called statically (similar to how PHPStorm does this with vanilla PHP use)
  • Add intention to add a docblock property for associated models (see below); ditto for auto-loaded model in Controller
  • Add a view file from a controller. Perhaps via ALT+ENTER. PHPStorm would prompt user for view file name and then know which folder to save it in based on the controller name (e.g. app/Controller/UsersController.php would have views in app/Views/Users/. If it could create the file from a file template that would be even better. Alternatively to ALT+ENTER, current CakeStorm has shortcut CTRL+ ; s (ctrl and semi-colon at same time, then 's') which gives quick-jump options from Controller to its view files. A shortcut could be added here to create a new view file.
  • Smart-jump for elements/view files, e.g.:

Pressing ctrl-B on the string "element_name" should open app/View/Elements/element_name.ctp.

//in a view file
<?= $this->Element("element_name") ?>

Pressing ctrl-B on the string "view_file" should open app/View/Users/view.ctp:

//UsersController.php
$this->render("view");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions