Componette

Componette

nette-intellij

nette-intellij / intellij-nette-factory-generator 1.2.0

PhpStorm plugin that generates Nette factory interfaces

Nette factory interface generator

Version Downloads

This plugin allows you to quickly generate factory interface for your components and other classes.

Installation and requirements

This plugin is written for PhpStorm 10 and above and is compiled for Java 8. You can find it in the Jetbrains plugin repository. Install it from Preferences → Plugins → Browse repositories... and search for it.

Usage

With cursor anywhere in a PHP class, press Alt + Enter to open the intentions selection. Choose "Generate service factory interface".

Intention menu

A dialog will pop up allowing you to change the name of the factory interface and pick which constructor parameters should be enumerated in the factory's create method.

Generate factory interface dialog

A new PHP file will then be created in the same directory, based on your PHP File file template. It will contain the factory interface, residing in the same namespace as the original class.

Generated factory interface

  • 1.2.0 1.2.0

    • Added checkbox to control whether to open the generated factory in the editor (see #4)
  • 1.1.2 1.1.2

    • Fixed EOF newline bug with CRLF (see #3)
  • 1.1.1 1.1.1

    • Fixed compatibility with 2017.1 (see #2)
  • 1.1.0 1.1.0

    • Fixed misplacement of phpdoc for PHP < 7.0 (#1)
    • Generated code follows project's indentation and newline settings
  • 1.0.0 1.0.0

bar-chart-fill

Statistics

download-cloud-fill
N/A
star-fill
21
bug-fill
0
flashlight-fill
6.1y
price-tag-2-line

Badges

Componette Componette felix@nette.org