{"id":22667085,"url":"https://github.com/pdir/phpstorm-contao-live-templates","last_synced_at":"2025-04-19T16:40:25.729Z","repository":{"id":88644880,"uuid":"238850831","full_name":"pdir/phpstorm-contao-live-templates","owner":"pdir","description":"A libary of PhpStorm Live Templates for Contao CMS","archived":false,"fork":false,"pushed_at":"2020-02-11T10:04:07.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T10:14:55.127Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-07T05:29:59.000Z","updated_at":"2024-04-04T06:49:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"dff2aeac-1748-405e-8540-7d0340a3c6b6","html_url":"https://github.com/pdir/phpstorm-contao-live-templates","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdir%2Fphpstorm-contao-live-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdir%2Fphpstorm-contao-live-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdir%2Fphpstorm-contao-live-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdir%2Fphpstorm-contao-live-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdir","download_url":"https://codeload.github.com/pdir/phpstorm-contao-live-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249740034,"owners_count":21318674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-09T14:33:34.891Z","updated_at":"2025-04-19T16:40:25.710Z","avatar_url":"https://github.com/pdir.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# PhpStorm Live Templates for Contao CMS\n\nA libary of PhpStorm Live Templates for Contao CMS\n\n## Installation\n\n1. Go to PhpStorm Preferences | Tools | Settings Repository\n2. Add Read-only Source https://github.com/pdir/phpstorm-contao-live-templates\n3. Restart PhpStorm\n\nVisit Preferences-\u003eEditor-\u003eLive Templates and ensure that the Contao CMS - Twig and Contao CMS - PHP Live Templates are enabled, as desired.\n\n- Contao CMS - Twig.xml\n- Contao CMS - PHP.xml\n\n## Contao Templates\n\n### DCA\n\n#### cdtext\n\n```php\n'' =\u003e [\n    'label' =\u003e \u0026$GLOBALS['TL_LANG'][$strTable][''],\n    'exclude' =\u003e true,\n    'sorting' =\u003e true,\n    'inputType' =\u003e 'text',\n    'eval' =\u003e ['maxlength'=\u003e255, 'tl_class'=\u003e'w50'],\n    'sql' =\u003e \"varchar(255) NOT NULL default ''\"\n],\n```\n\n#### cdpwd\n\n```php\n'' =\u003e [\n    'label' =\u003e \u0026$GLOBALS['TL_LANG'][$strTable][''],\n    'exclude' =\u003e true,\n    'inputType' =\u003e 'password',\n    'eval' =\u003e ['tl_class'=\u003e'w50','mandatory'=\u003etrue, 'preserveTags'=\u003etrue, 'minlength'=\u003e\\Contao\\Config::get('minPasswordLength')],\n    'sql' =\u003e \"varchar(128) NOT NULL default ''\"\n],\n```\n\n#### cdtextarea\n\n```php\n'' =\u003e [\n    'label' =\u003e \u0026$GLOBALS['TL_LANG'][$strTable][''],\n    'exclude' =\u003e true,\n    'search' =\u003e true,\n    'inputType' =\u003e 'textarea',\n    'eval' =\u003e ['rte'=\u003e'tinyMCE', 'tl_class'=\u003e'clr'],\n    'sql' =\u003e 'text NOT NULL'\n],\n```\n\n#### cdselect\n\n```php\n'' =\u003e [\n    'label' =\u003e \u0026$GLOBALS['TL_LANG'][$strTable][''],\n    'exclude' =\u003e true,\n    'inputType' =\u003e 'select',\n    'options' =\u003e $GLOBALS['TL_LANG'][$strTable]['']['options'],\n    //'foreignKey' =\u003e 'tl_user.name',\n    //'options_callback' =\u003e ['CLASS', 'METHOD'],\n    'eval'=\u003e ['includeBlankOption'=\u003etrue, 'tl_class'=\u003e'w50'],\n    'sql' =\u003e \"varchar(255) NOT NULL default ''\"\n],\n```\n\n#### cdclicklist\n\n```php\n'' =\u003e [\n    'label' =\u003e \u0026$GLOBALS['TL_LANG'][$strTable][''],\n    'exclude' =\u003e true,\n    'inputType' =\u003e 'select',\n    'options' =\u003e $GLOBALS['TL_LANG'][$strTable]['']['options'],\n    //'foreignKey' =\u003e 'tl_user.name',\n    //'options_callback' =\u003e ['CLASS', 'METHOD'],\n    'eval'=\u003e ['maxlength'=\u003e255, 'includeBlankOption'=\u003etrue, 'multiple'=\u003etrue, 'chosen'=\u003etrue],\n    'sql' =\u003e \"varchar(255) NOT NULL default ''\"\n],\n```\n\n#### cdradio\n\n```php\n'' =\u003e [\n    'label' =\u003e \u0026$GLOBALS['TL_LANG'][$strTable][''],\n    'exclude' =\u003e true,\n    'inputType' =\u003e 'radio',\n    'eval' =\u003e ['tl_class'=\u003e'w50'],\n    'sql' =\u003e \"varchar(255) NOT NULL default ''\"\n],\n```\n\n#### cdradiotable\n\n```php\n'' =\u003e [\n    'label' =\u003e \u0026$GLOBALS['TL_LANG'][$strTable][''],\n    'exclude' =\u003e true,\n    'inputType' =\u003e 'radioTable',\n    'options' =\u003e $GLOBALS['TL_LANG'][$strTable]['']['options'],\n    //'foreignKey' =\u003e 'tl_user.name',\n    //'options_callback' =\u003e ['CLASS', 'METHOD'],\n    'eval'=\u003e ['cols'=\u003e4, 'tl_class'=\u003e'w50'],\n    'sql' =\u003e \"varchar(255) NOT NULL default ''\"\n],\n```\n\n#### cdimagesize\n\n```php\n'' =\u003e [\n    'label' =\u003e \u0026$GLOBALS['TL_LANG'][$strTable][''],\n    'exclude' =\u003e true,\n    'inputType' =\u003e 'imageSize',\n    'options' =\u003e \\Contao\\System::getImageSizes(),\n    'reference' =\u003e \u0026$GLOBALS['TL_LANG']['MSC'],\n    'eval'=\u003e ['rgxp'=\u003e'natural', 'includeBlankOption'=\u003etrue, 'nospace'=\u003etrue, 'helpwizard'=\u003etrue, 'tl_class'=\u003e'w50'],\n    'sql' =\u003e \"varchar(64) NOT NULL default ''\"\n],\n```\n\n\n## Contao Twig Templates\n\n#### lorem\n\n```php\nLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n```\n\n#### Debugging\n\n    td                 \u003cpre\u003e{{ dump() }}\u003c/pre\u003e\n    tdump              {{ dump() }}\n\n## PHP Little Helper\n\n#### Debugging\n\n    cdd             var_dump(); die();\n    cd              echo \"\u003cbr\u003e VARIABLE\u003cbr\u003e\u003cpre\u003e\"; var_dump(VARIABLE); echo \"\u003c/pre\u003e\";\n    cp              echo \"\u003cpre\u003e\"; print_r(VARIABLE); echo \"\u003c/pre\u003e\";\n\n## Maintenance \u0026 Contributions\nIf you'd like to contribute to the Contao CMS Live Templates, please consider submitting a pull request, reporting an issue, providing examples of how you would like to see the behavior of the Live Templates improved, or just sending your thoughts.\n\n## References\n\n- [Contao CMS](https://contao.org)\n- [Twig](http://www.twig-project.org/)\n- [PhpStorm](https://www.jetbrains.com/phpstorm/)\n- [DCA Fields](https://easysolutionsit.de/artikel/vorlagen-f%C3%BCr-dca-felder.html)\n- [Sponsored by Ingolf aka zonky](http://e-spin.de/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdir%2Fphpstorm-contao-live-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdir%2Fphpstorm-contao-live-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdir%2Fphpstorm-contao-live-templates/lists"}