├── .gitignore ├── Makefile ├── README.md ├── _templates └── layout.html ├── actions ├── container_builder.png ├── container_builder_context.png ├── index.rst ├── profiler.png ├── translation_extract_key_action.png └── translation_extract_key_menu.png ├── conf.py ├── extension ├── doctrine_querybuilder.rst ├── method_parameter.rst ├── querybuilder-select.png ├── signature_type.rst └── signature_type_setting.png ├── index.rst └── languages ├── php ├── controller_method_related_files.png ├── index.rst └── service_class_definition.png ├── twig ├── index.rst ├── phpstorm_translation_fix.png ├── twig_implementations.png └── twig_phptype_completion.png ├── xml └── index.rst └── yaml ├── index.rst └── symfony2_config_phpstorm.png /.gitignore: -------------------------------------------------------------------------------- 1 | /_build -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | 49 | clean: 50 | rm -rf $(BUILDDIR)/* 51 | 52 | html: 53 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 54 | @echo 55 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 56 | 57 | dirhtml: 58 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 59 | @echo 60 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 61 | 62 | singlehtml: 63 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 64 | @echo 65 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 66 | 67 | pickle: 68 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 69 | @echo 70 | @echo "Build finished; now you can process the pickle files." 71 | 72 | json: 73 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 74 | @echo 75 | @echo "Build finished; now you can process the JSON files." 76 | 77 | htmlhelp: 78 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 79 | @echo 80 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 81 | ".hhp project file in $(BUILDDIR)/htmlhelp." 82 | 83 | qthelp: 84 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 85 | @echo 86 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 87 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 88 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/test.qhcp" 89 | @echo "To view the help file:" 90 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/test.qhc" 91 | 92 | devhelp: 93 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 94 | @echo 95 | @echo "Build finished." 96 | @echo "To view the help file:" 97 | @echo "# mkdir -p $$HOME/.local/share/devhelp/test" 98 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/test" 99 | @echo "# devhelp" 100 | 101 | epub: 102 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 103 | @echo 104 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 105 | 106 | latex: 107 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 108 | @echo 109 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 110 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 111 | "(use \`make latexpdf' here to do that automatically)." 112 | 113 | latexpdf: 114 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 115 | @echo "Running LaTeX files through pdflatex..." 116 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 117 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 118 | 119 | latexpdfja: 120 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 121 | @echo "Running LaTeX files through platex and dvipdfmx..." 122 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 123 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 124 | 125 | text: 126 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 127 | @echo 128 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 129 | 130 | man: 131 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 132 | @echo 133 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 134 | 135 | texinfo: 136 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 137 | @echo 138 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 139 | @echo "Run \`make' in that directory to run these through makeinfo" \ 140 | "(use \`make info' here to do that automatically)." 141 | 142 | info: 143 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 144 | @echo "Running Texinfo files through makeinfo..." 145 | make -C $(BUILDDIR)/texinfo info 146 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 147 | 148 | gettext: 149 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 150 | @echo 151 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 152 | 153 | changes: 154 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 155 | @echo 156 | @echo "The overview file is in $(BUILDDIR)/changes." 157 | 158 | linkcheck: 159 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 160 | @echo 161 | @echo "Link check complete; look for any errors in the above output " \ 162 | "or in $(BUILDDIR)/linkcheck/output.txt." 163 | 164 | doctest: 165 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 166 | @echo "Testing of doctests in the sources finished, look at the " \ 167 | "results in $(BUILDDIR)/doctest/output.txt." 168 | 169 | xml: 170 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 171 | @echo 172 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 173 | 174 | pseudoxml: 175 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 176 | @echo 177 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 178 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | idea-php-symfony2-plugin-doc 2 | ============================ 3 | 4 | Documentation for PhpStorm / IntelliJ Symfony2 Plugin 5 | --------------- 6 | http://plugins.jetbrains.com/plugin/7219?pr=phpStorm 7 | https://github.com/adrienbrault/idea-php-symfony2-plugin 8 | 9 | Link to current doc build 10 | --------------- 11 | http://symfony2-plugin.espend.de/ 12 | 13 | How to build 14 | --------------- 15 | http://symfony.com/doc/current/contributing/documentation/format.html#testing-documentation 16 | https://github.com/fabpot/sphinx-php 17 | 18 | Theme 19 | --------------- 20 | https://github.com/ryan-roemer/sphinx-bootstrap-theme -------------------------------------------------------------------------------- /_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | 3 | {# Add github banner (from: https://github.com/blog/273-github-ribbons). #} 4 | {% block header %} 5 | {{ super() }} 6 | Fork me on GitHub 7 | 8 | 9 | 21 | 22 | 23 | 24 | 25 | {% endblock %} 26 | 27 | -------------------------------------------------------------------------------- /actions/container_builder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haehnchen/idea-php-symfony2-plugin-doc/14b4a379ba630b9a3314c0135456ef6527ba69ae/actions/container_builder.png -------------------------------------------------------------------------------- /actions/container_builder_context.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haehnchen/idea-php-symfony2-plugin-doc/14b4a379ba630b9a3314c0135456ef6527ba69ae/actions/container_builder_context.png -------------------------------------------------------------------------------- /actions/index.rst: -------------------------------------------------------------------------------- 1 | .. index:: 2 | single: Actions 3 | 4 | Actions 5 | ======================== 6 | 7 | Service Builder 8 | ------------------------- 9 | .. image:: container_builder.png 10 | .. image:: container_builder_context.png 11 | 12 | .. code-block:: php 13 | 14 | # Symfony\Bundle\FrameworkBundle\Controller\Controller::generateUrl 15 | namespace Acme\FooBundle; 16 | class Foo extends ContainerAware {} 17 | class Foo {} 18 | 19 | * ``action`` - Class definition name or context of yaml or yml 20 | 21 | Profiler Statusbar 22 | ------------------------- 23 | .. image:: profiler.png 24 | 25 | Search for profiler config in container folders and provide internal targets for related latest Requests. 26 | 27 | Translation Extractor 28 | ------------------------- 29 | 30 | .. code-block:: html+jinja 31 | 32 |
foo
33 |
34 | 35 | .. image:: translation_extract_key_menu.png 36 | 37 | .. image:: translation_extract_key_action.png -------------------------------------------------------------------------------- /actions/profiler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haehnchen/idea-php-symfony2-plugin-doc/14b4a379ba630b9a3314c0135456ef6527ba69ae/actions/profiler.png -------------------------------------------------------------------------------- /actions/translation_extract_key_action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haehnchen/idea-php-symfony2-plugin-doc/14b4a379ba630b9a3314c0135456ef6527ba69ae/actions/translation_extract_key_action.png -------------------------------------------------------------------------------- /actions/translation_extract_key_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haehnchen/idea-php-symfony2-plugin-doc/14b4a379ba630b9a3314c0135456ef6527ba69ae/actions/translation_extract_key_menu.png -------------------------------------------------------------------------------- /conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # test documentation build configuration file, created by 4 | # sphinx-quickstart on Sat Jul 20 09:50:14 2013. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | import sys, os 15 | import sphinx_bootstrap_theme 16 | from sphinx.highlighting import lexers 17 | from pygments.lexers.web import PhpLexer 18 | 19 | # If extensions (or modules to document with autodoc) are in another directory, 20 | # add these directories to sys.path here. If the directory is relative to the 21 | # documentation root, use os.path.abspath to make it absolute, like shown here. 22 | #sys.path.insert(0, os.path.abspath('.')) 23 | 24 | # -- General configuration ----------------------------------------------------- 25 | 26 | # If your documentation needs a minimal Sphinx version, state it here. 27 | #needs_sphinx = '1.0' 28 | 29 | # Add any Sphinx extension module names here, as strings. They can be extensions 30 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 31 | extensions = ['sensio.sphinx.refinclude', 'sensio.sphinx.configurationblock', 'sensio.sphinx.phpcode'] 32 | 33 | 34 | # enable highlighting for PHP code not between ```` by default 35 | lexers['php'] = PhpLexer(startinline=True) 36 | lexers['php-annotations'] = PhpLexer(startinline=True) 37 | api_url = 'http://api.symfony.com/master/%s' 38 | 39 | primary_domain = 'php' 40 | 41 | # The suffix of source filenames. 42 | source_suffix = '.rst' 43 | 44 | # The encoding of source files. 45 | #source_encoding = 'utf-8-sig' 46 | 47 | # The master toctree document. 48 | master_doc = 'index' 49 | 50 | # General information about the project. 51 | project = u'Symfony2 PhpStorm Plugin' 52 | copyright = u'2014, Daniel Espendiller' 53 | 54 | # The version info for the project you're documenting, acts as replacement for 55 | # |version| and |release|, also used in various other places throughout the 56 | # built documents. 57 | # 58 | # The short X.Y version. 59 | version = '0.11' 60 | # The full version, including alpha/beta/rc tags. 61 | release = '0.11' 62 | 63 | # The language for content autogenerated by Sphinx. Refer to documentation 64 | # for a list of supported languages. 65 | #language = None 66 | 67 | # There are two options for replacing |today|: either, you set today to some 68 | # non-false value, then it is used: 69 | #today = '' 70 | # Else, today_fmt is used as the format for a strftime call. 71 | #today_fmt = '%B %d, %Y' 72 | 73 | # List of patterns, relative to source directory, that match files and 74 | # directories to ignore when looking for source files. 75 | exclude_patterns = ['_build'] 76 | 77 | # The reST default role (used for this markup: `text`) to use for all documents. 78 | #default_role = None 79 | 80 | # If true, '()' will be appended to :func: etc. cross-reference text. 81 | #add_function_parentheses = True 82 | 83 | # If true, the current module name will be prepended to all description 84 | # unit titles (such as .. function::). 85 | #add_module_names = True 86 | 87 | # If true, sectionauthor and moduleauthor directives will be shown in the 88 | # output. They are ignored by default. 89 | #show_authors = False 90 | 91 | # The name of the Pygments (syntax highlighting) style to use. 92 | pygments_style = 'sphinx' 93 | 94 | # A list of ignored prefixes for module index sorting. 95 | #modindex_common_prefix = [] 96 | 97 | # If true, keep warnings as "system message" paragraphs in the built documents. 98 | #keep_warnings = False 99 | 100 | 101 | # -- Options for HTML output --------------------------------------------------- 102 | 103 | # The theme to use for HTML and HTML Help pages. See the documentation for 104 | # a list of builtin themes. 105 | html_theme = 'bootstrap' 106 | 107 | # Theme options are theme-specific and customize the look and feel of a theme 108 | # further. For a list of options available for each theme, see the 109 | # documentation. 110 | html_theme_options = { 111 | 'navbar_fixed_top': "true", 112 | 'navbar_class': "navbar navbar-inverse", 113 | } 114 | 115 | # Add any paths that contain custom themes here, relative to this directory. 116 | #html_theme_path = ['.'] 117 | #templates_path = ['.', '_templates'] 118 | html_theme = 'bootstrap' 119 | html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() 120 | templates_path = ['_templates'] 121 | 122 | # The name for this set of Sphinx documents. If None, it defaults to 123 | # " v documentation". 124 | #html_title = None 125 | 126 | # A shorter title for the navigation bar. Default is the same as html_title. 127 | #html_short_title = None 128 | 129 | # The name of an image file (relative to this directory) to place at the top 130 | # of the sidebar. 131 | #html_logo = None 132 | 133 | # The name of an image file (within the static path) to use as favicon of the 134 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 135 | # pixels large. 136 | #html_favicon = None 137 | 138 | # Add any paths that contain custom static files (such as style sheets) here, 139 | # relative to this directory. They are copied after the builtin static files, 140 | # so a file named "default.css" will overwrite the builtin "default.css". 141 | #html_static_path = ['_static'] 142 | 143 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 144 | # using the given strftime format. 145 | #html_last_updated_fmt = '%b %d, %Y' 146 | 147 | # If true, SmartyPants will be used to convert quotes and dashes to 148 | # typographically correct entities. 149 | #html_use_smartypants = True 150 | 151 | # Custom sidebar templates, maps document names to template names. 152 | #html_sidebars = {} 153 | 154 | # Additional templates that should be rendered to pages, maps page names to 155 | # template names. 156 | #html_additional_pages = {} 157 | 158 | # If false, no module index is generated. 159 | #html_domain_indices = True 160 | 161 | # If false, no index is generated. 162 | #html_use_index = True 163 | 164 | # If true, the index is split into individual pages for each letter. 165 | #html_split_index = False 166 | 167 | # If true, links to the reST sources are added to the pages. 168 | #html_show_sourcelink = True 169 | 170 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 171 | #html_show_sphinx = True 172 | 173 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 174 | #html_show_copyright = True 175 | 176 | # If true, an OpenSearch description file will be output, and all pages will 177 | # contain a tag referring to it. The value of this option must be the 178 | # base URL from which the finished HTML is served. 179 | #html_use_opensearch = '' 180 | 181 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 182 | #html_file_suffix = None 183 | 184 | # Output file base name for HTML help builder. 185 | htmlhelp_basename = 'testdoc' 186 | 187 | 188 | # -- Options for LaTeX output -------------------------------------------------- 189 | 190 | latex_elements = { 191 | # The paper size ('letterpaper' or 'a4paper'). 192 | #'papersize': 'letterpaper', 193 | 194 | # The font size ('10pt', '11pt' or '12pt'). 195 | #'pointsize': '10pt', 196 | 197 | # Additional stuff for the LaTeX preamble. 198 | #'preamble': '', 199 | } 200 | 201 | # Grouping the document tree into LaTeX files. List of tuples 202 | # (source start file, target name, title, author, documentclass [howto/manual]). 203 | latex_documents = [ 204 | ('index', 'test.tex', u'test Documentation', 205 | u'test', 'manual'), 206 | ] 207 | 208 | # The name of an image file (relative to this directory) to place at the top of 209 | # the title page. 210 | #latex_logo = None 211 | 212 | # For "manual" documents, if this is true, then toplevel headings are parts, 213 | # not chapters. 214 | #latex_use_parts = False 215 | 216 | # If true, show page references after internal links. 217 | #latex_show_pagerefs = False 218 | 219 | # If true, show URL addresses after external links. 220 | #latex_show_urls = False 221 | 222 | # Documents to append as an appendix to all manuals. 223 | #latex_appendices = [] 224 | 225 | # If false, no module index is generated. 226 | #latex_domain_indices = True 227 | 228 | 229 | # -- Options for manual page output -------------------------------------------- 230 | 231 | # One entry per manual page. List of tuples 232 | # (source start file, name, description, authors, manual section). 233 | man_pages = [ 234 | ('index', 'test', u'test Documentation', 235 | [u'test'], 1) 236 | ] 237 | 238 | # If true, show URL addresses after external links. 239 | #man_show_urls = False 240 | 241 | 242 | # -- Options for Texinfo output ------------------------------------------------ 243 | 244 | # Grouping the document tree into Texinfo files. List of tuples 245 | # (source start file, target name, title, author, 246 | # dir menu entry, description, category) 247 | texinfo_documents = [ 248 | ('index', 'test', u'test Documentation', 249 | u'test', 'test', 'One line description of project.', 250 | 'Miscellaneous'), 251 | ] 252 | 253 | # Documents to append as an appendix to all manuals. 254 | #texinfo_appendices = [] 255 | 256 | # If false, no module index is generated. 257 | #texinfo_domain_indices = True 258 | 259 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 260 | #texinfo_show_urls = 'footnote' 261 | 262 | # If true, do not generate a @detailmenu in the "Top" node's menu. 263 | #texinfo_no_detailmenu = False 264 | -------------------------------------------------------------------------------- /extension/doctrine_querybuilder.rst: -------------------------------------------------------------------------------- 1 | .. index:: 2 | single: Doctrine QueryBuilder 3 | 4 | Doctrine QueryBuilder 5 | ======================== 6 | Provide return types for Method calls 7 | 8 | Root Entity 9 | ------------------------- 10 | 11 | Every querybuilder object need to have a root entity, some provider are in 12 | 13 | .. code-block:: php 14 | 15 | // PhpTypeProvider 16 | $repository = $foo->getRepository('BundleName'); 17 | $qb = $repository->createQueryBuilder('test')->addSelect('test'); 18 | 19 | // \Doctrine\Common\Persistence\ObjectRepository 20 | class FooRepository extends EntityRepository { 21 | public function foo() { 22 | $qb = $this->createQueryBuilder('foo_alias'); 23 | } 24 | } 25 | 26 | // \Doctrine\ORM\QueryBuilder::from 27 | $qb = $this->getEntityManager()->createQueryBuilder(); 28 | $qb->from('Foo\Class', 'foo') 29 | 30 | // inline 31 | $qb = $em->getRepository('FooBundle:FooEntity')->createQueryBuilder('foo') 32 | 33 | // chaining 34 | $qb = $this>getMyQueryBuilder()->addSelect(''); 35 | 36 | .. image:: querybuilder-select.png 37 | 38 | 39 | Supported Calls 40 | ------------------------- 41 | 42 | .. code-block:: php 43 | 44 | $qb->select('job'); 45 | $qb->select(array('job', 'dependencies')); 46 | 47 | $qb->addSelect('job'); 48 | $qb->addSelect(array('job', 'dependencies')); 49 | 50 | $qb->setParameter('foo'); 51 | $qb->setParameters(array('foo' => 'bar')); 52 | 53 | $qb->join('foo.bar', 'bar'); 54 | // and all other joins 55 | 56 | $qb->groupBy('foo.bar'); 57 | $qb->addGroupBy('foo.bar'); 58 | 59 | $qb->orderBy('foo.bar'); 60 | $qb->addOrderBy('foo.bar'); 61 | 62 | $qb->where('foo.bar'); 63 | $qb->andWhere('foo.bar'); 64 | $qb->orWhere('foo.bar'); -------------------------------------------------------------------------------- /extension/method_parameter.rst: -------------------------------------------------------------------------------- 1 | .. index:: 2 | single: Method Parameter 3 | 4 | Method Parameter 5 | ======================== 6 | 7 | Signature 8 | ------------------------- 9 | 10 | Provides completion and got for method parameter values. configuration `Symfony2 Plugin -> Method References` 11 | 12 | .. code-block:: php 13 | 14 | # \Knp\Menu\ItemInterface:addChild:0:route:parameter 15 | # Knp\Menu\ItemInterface::addChild 16 | $menu->addChild(''); 17 | 18 | .. code-block:: php 19 | 20 | # \Knp\Menu\ItemInterface:addChild:1:route:array_value:route 21 | # Knp\Menu\ItemInterface::addChild 22 | $menu->addChild('foo', array( 23 | 'route' => '', 24 | )); 25 | 26 | .. code-block:: php 27 | 28 | # \Knp\Menu\ItemInterface:addChild:1:route:array_key 29 | # Knp\Menu\ItemInterface::addChild 30 | $menu->addChild('foo', array( 31 | '' => '', 32 | )); 33 | 34 | * ``goto`` - known string in provider 35 | * ``complete`` - when support by provider 36 | 37 | Hash Tags 38 | ------------------------- 39 | 40 | .. code-block:: php 41 | 42 | /** 43 | * @param string $route Foo bar text #Route and some more 44 | * @param string $entity Foo bar text #Entity and some more 45 | */ 46 | public function foo($route, $entity) {} 47 | $this->foo('', ''); 48 | 49 | * ``goto`` - known string in # 50 | * ``complete`` - when support by # 51 | 52 | supported ``Entity``, ``Service``, ``FormType``, ``Template``, ``Route``, ``Class``, ``TranslationKey`` , ``TranslationDomain``, ``FormOption``, ``Interface`` 53 | 54 | .. note:: 55 | TranslationKey are filtered on a TranslationDomain parameter, when provided else fallback to ``messages`` 56 | You should better use defined parameter on signatures which are docblock independent 57 | 58 | -------------------------------------------------------------------------------- /extension/querybuilder-select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haehnchen/idea-php-symfony2-plugin-doc/14b4a379ba630b9a3314c0135456ef6527ba69ae/extension/querybuilder-select.png -------------------------------------------------------------------------------- /extension/signature_type.rst: -------------------------------------------------------------------------------- 1 | .. index:: 2 | single: Signature Types 3 | 4 | Signature Types 5 | ======================== 6 | Provide return types for Method calls 7 | 8 | Settings 9 | ------------------------- 10 | 11 | .. image:: signature_type_setting.png 12 | 13 | * ``CallTo`` - Class or interface name (prefer use Interface) should FQN and start with ``\`` 14 | * ``Method`` - Method name 15 | * ``Index`` - Parameter of Method containing string to resolve (starts with 0) 16 | * ``Provider`` - Provider which can resolve the string 17 | 18 | Example 19 | ------------------------- 20 | 21 | .. code-block:: php 22 | 23 | # \PHPUnit_Framework_TestCase:getMock:0:Class 24 | class MyTest extends \PHPUnit_Framework_TestCase { 25 | function testAppConfig() { 26 | $mock = $this->getMock('ClassName'); 27 | } 28 | } 29 | 30 | * ``type`` - Return type of the Mock 31 | * ``goto`` - You can also use "Method Reference" to get class support 32 | * ``complete`` - use "Method Reference" 33 | -------------------------------------------------------------------------------- /extension/signature_type_setting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haehnchen/idea-php-symfony2-plugin-doc/14b4a379ba630b9a3314c0135456ef6527ba69ae/extension/signature_type_setting.png -------------------------------------------------------------------------------- /index.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | Symfony2 PhpStorm Plugin Documentation 3 | ====================== 4 | 5 | .. sidebar:: Links 6 | 7 | - `Donate `_ 8 | - `Download `_ 9 | - `GitHub `_ 10 | - `Doc Source `_ 11 | 12 | 13 | Navigation 14 | ====================== 15 | 16 | .. toctree:: 17 | :glob: 18 | 19 | languages/php/index 20 | languages/twig/index 21 | languages/yaml/index 22 | languages/xml/index 23 | extension/method_parameter 24 | extension/signature_type 25 | extension/doctrine_querybuilder 26 | actions/index -------------------------------------------------------------------------------- /languages/php/controller_method_related_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Haehnchen/idea-php-symfony2-plugin-doc/14b4a379ba630b9a3314c0135456ef6527ba69ae/languages/php/controller_method_related_files.png -------------------------------------------------------------------------------- /languages/php/index.rst: -------------------------------------------------------------------------------- 1 | .. index:: 2 | single: PHP 3 | 4 | PHP 5 | ======================== 6 | 7 | Templates 8 | ------------------------- 9 | 10 | .. code-block:: php 11 | 12 | # Symfony\Bundle\FrameworkBundle\Controller\Controller 13 | # Symfony\Bundle\TwigBundle\TwigEngine 14 | $this->render('') 15 | $this->renderView('') 16 | 17 | based on ``BundleInterface``, ``addPath`` of container and custom path of settings 18 | 19 | * ``goto`` - Template file 20 | * ``complete`` - Template names 21 | * ``annotator`` - Mark missing template and provides twig template create action 22 | 23 | .. code-block:: php 24 | 25 | /** 26 | * @Template() 27 | */ 28 | public function indexAction() { } 29 | 30 | .. code-block:: php 31 | 32 | /** 33 | * @Template("") 34 | */ 35 | public function indexAction() { } 36 | 37 | * ``goto`` - Template on click of ``@Template`` 38 | * ``complete`` - Template names 39 | * ``annotator`` - Mark missing template and provides twig template create action 40 | 41 | .. code-block:: php 42 | 43 | '' 44 | 45 | all string ending with ``.twig`` provides goto 46 | 47 | 48 | Service / Parameter 49 | ------------------------- 50 | .. code-block:: php 51 | 52 | # Symfony\Component\DependencyInjection\ContainerInterface::get 53 | $this->container->get(''); 54 | $this->container->get(SERVICE::NAME); 55 | $this->container->get($this->name); 56 | 57 | * ``goto`` - Goto service class 58 | * ``complete`` - Service name 59 | * ``annotator`` - Mark missing service 60 | * ``type`` - The class type of service definition 61 | 62 | .. code-block:: php 63 | 64 | # Symfony\Component\DependencyInjection\ContainerInterface::has 65 | $this->container->has(''); 66 | 67 | * ``goto`` - see above 68 | * ``complete`` - see above 69 | 70 | .. code-block:: php 71 | 72 | # \Symfony\Component\DependencyInjection\ContainerInterface::* 73 | $this->container->getParameter(''); 74 | $this->container->hasParameter(''); 75 | 76 | * ``complete`` - Defined parameter 77 | 78 | Container Builder 79 | ------------------------- 80 | .. code-block:: php 81 | 82 | # \Symfony\Component\DependencyInjection\Reference 83 | new Reference(''); 84 | 85 | # \Symfony\Component\DependencyInjection\Definition 86 | new Definition(''); 87 | 88 | # \Symfony\Component\DependencyInjection\Alias 89 | new Alias(''); 90 | 91 | # \Symfony\Component\DependencyInjection\ContainerBuilder::setAlias 92 | $container->setAlias('alias', ''); 93 | 94 | # \Symfony\Component\DependencyInjection\ContainerBuilder::findDefinition 95 | $container->findDefinition(''); 96 | 97 | # \Symfony\Component\DependencyInjection\ContainerBuilder::hasDefinition 98 | $container->hasDefinition(''); 99 | 100 | # \Symfony\Component\DependencyInjection\ContainerBuilder::getDefinition 101 | $container->getDefinition(''); 102 | 103 | # \Symfony\Component\DependencyInjection\ContainerBuilder::findTaggedServiceIds 104 | $container->findTaggedServiceIds(''); 105 | 106 | * ``goto`` - tags: all tagged services 107 | 108 | .. note:: 109 | All ContainerBuilder calls provides access to service-index which includes private ones 110 | 111 | Doctrine 112 | ------------------------- 113 | 114 | .. code-block:: php 115 | 116 | $em->getRepository(Entity::class); 117 | $em->getRepository($this->foo); 118 | $em->getRepository(''); 119 | 120 | * ``goto`` - Go to entity class 121 | * ``complete`` - All classes in Doctrine entity namespaces as shortcut name 122 | * ``type`` - Return repositoryClass of entity supported parser in order: annotations, yaml, CLASSRepository 123 | 124 | .. note:: 125 | Entities in subfolder are not supported because of PhpStorm issues 126 | 127 | .. code-block:: php 128 | 129 | $em->getRepository('')->find(1); 130 | $em->getRepository('')->findOneBy(array()); 131 | $em->getRepository('')->findBy(array()); 132 | $em->getRepository('')->findAll(); 133 | 134 | * ``type`` - Return Entity or Entity[] 135 | 136 | .. code-block:: php 137 | 138 | # Doctrine\Common\Persistence\ObjectManager::find 139 | $em->find('FooBundle:Invite', 1) ; 140 | 141 | * ``type`` - Return Entity 142 | * ``goto`` - see above 143 | * ``type`` - see above 144 | 145 | 146 | Translation 147 | ------------------------- 148 | .. code-block:: php 149 | 150 | #Symfony\Component\Translation\Translator::trans 151 | #Symfony\Component\Translation\Translator::transChoice 152 | 153 | $t->trans('translation.key', array(), '') 154 | $t->transChoice('translation.key', 2, array(), '') 155 | 156 | * ``goto`` - Domain file like yaml or other, from container file 157 | * ``complete`` - Domain file like yaml or other, from container file 158 | * ``annotator`` - Mark missing domain files 159 | 160 | .. code-block:: php 161 | 162 | # Symfony\Component\Translation\Translator::trans 163 | # Symfony\Component\Translation\Translator::transChoice 164 | 165 | $t->trans('', array(), 'Domain') 166 | $t->transChoice('', 2, array(), 'Domain') 167 | 168 | * ``goto`` - Yaml Key-Value of Domain, default ``messages`` or ``trans_default_domain`` of current file 169 | * ``complete`` - All known translation key filtered by domain name 170 | * ``annotator`` - Mark missing translation and provide quick fix, which create key inside domain file 171 | 172 | Routing 173 | ------------------------- 174 | 175 | .. code-block:: php 176 | 177 | # Symfony\Bundle\FrameworkBundle\Controller\Controller::generateUrl 178 | $this->generateUrl('_configurator_final', array('parameter' => 'test')) 179 | 180 | * ``goto`` - Controller action method and parameter 181 | * ``complete`` - Routing name and parameter of eg. appDevUrlGenerator.php 182 | * ``annotator`` - Mark missing routing name 183 | 184 | .. code-block:: php 185 | 186 | # Symfony\Bundle\FrameworkBundle\Controller\Controller::forward 187 | $this->forward('', array('parameter' => 'test')) 188 | 189 | * ``goto`` - Controller action method 190 | * ``complete`` - Controller names of Bundle structure or controller services as shortcut 191 | 192 | .. code-block:: php 193 | 194 | # Symfony\Bundle\FrameworkBundle\Controller\Controller::forward 195 | # Symfony\Bundle\FrameworkBundle\Controller\Controller::generateUrl 196 | $this->generateUrl('', array('' => 'test')) 197 | 198 | * ``goto`` - Method Parameter 199 | * ``complete`` - Parameters of route 200 | 201 | 202 | Forms 203 | ------------------------- 204 | 205 | .. code-block:: php 206 | 207 | # Symfony\Component\Form\FormBuilderInterface::add 208 | $builder->add('field', ''); 209 | 210 | * ``goto`` - resolved class 211 | * ``complete`` - Registered FormTypes aliases 212 | 213 | .. code-block:: php 214 | 215 | # Symfony\Component\Form\FormBuilderInterface::add 216 | $builder->add('field', 'button' , array( 217 | 'label' => '', 218 | 'help_inline' => '', 219 | 'help_block' => '', 220 | 'translation_domain' => '', 221 | )); 222 | 223 | * ``goto`` - Translation definition 224 | * ``complete`` - Translation key or domain 225 | 226 | .. note:: 227 | also ``translation_domain`` inside ``OptionsResolverInterface::setDefaults`` is supported for filter 228 | 229 | .. code-block:: php 230 | 231 | # Symfony\Component\OptionsResolver\OptionsResolverInterface::setDefaults 232 | $resolver->setDefaults(array( 233 | 'data_class' => '' 234 | )); 235 | 236 | # Symfony\Component\Form\FormBuilderInterface::add 237 | $builder->add('field', 'form_alias'|FormTypeInterface, array( 238 | 'class' => '' 239 | )); 240 | 241 | * ``goto`` - Class definition 242 | * ``complete`` - Class name of doctrine namespaced entities 243 | 244 | .. code-block:: php 245 | 246 | # Symfony\Component\Form\FormBuilderInterface::add 247 | $builder->add('field', 'form_alias'|FormTypeInterface, array( 248 | '