Use cakephp 4's i18nExtract command for ctp files - php

I have recently updated an existing application to Cakephp 4. Although this Cakephp version uses php as the extension for templates, I have modified the web/src/View/AppView.php file to set ctp as the extension in order to not change all views' extension. The problem is that the i18n command extracts translations from php files, and the only way I found to extract the translations was to manually change the web/vendor/cakephp/cakephp/src/Command/I18nExtractCommand.php, but I would like to have a more orthodox solution that does not require to change vendor files so that I can reproduce it with the current cakephp fileset.

Related

How to edit moodle core files with plugins?

I was trying to make some features inside my version of Moodle but that requires to alter or edit the core files or add new functions to the core files and for sure if I tried to upgrade my version all edits will be gone so I was trying to create a plugin for this edits but couldn't find any how to do it .. and most of the documents for older version .. so my question now is how to modify core files with a plugin?
Thanks
how to modify core files with a plugin
You cannot do it directly, but you may use the CustomScripts functionality to substitute executable files with your own

Using the Right Translation file in Symfony Manually

I do not have access do composer or any command line tool on the environment, so I'm doing it manually.
Problem is: I didn't find any route to the translation file I want do use (mynewBundle/resources/translation/messages.pt.xlf) and it's using the translation file of the original bundle I used as reference (oldBundle/resources/translation/messages.pt.xlf).
Where can I change this setting?
Thanks.
Symfony will collect translations from various sources by default:
app/Resources/translations/
app/Resources/<BundleName>/translations
inside the bundle: Resources/translations
Symfony will load translations in priority from these folders, so you can overwrite the translations inside a bundle by putting the new ones into app/Resources/<BundleName>/translations. If you have both, the old and new bundle, still inside your project than it could very well be that the old translations have a higher priority by means how the bundles are loaded.
If you can't remove the old bundle then you best chance is, to place the new translations into app/Resources/MyNewBundle/translations/messages.pt.xlf, instead of leaving them inside the bundle.

phpstorm configuration for laravel, phalcon or codeigniter?

How do I configure PHPStorm autocomplete to framework codeignitir 3 and others, for example to call methods or function with ctrl+space?
This shouldn't be necessary for frameworks like Laravel or CodeIgniter, since their code should already be included in your PhpStorm project (and thus accessible to the IDE to facilitate code navigation/auto-completion/etc.).
However, since Phalcon is a PHP extension, you'll need to download its plaintext source files and include them as an external library in your PhpStorm project. To do this, clone the https://github.com/phalcon/phalcon-devtools.git repository into a folder outside of your main project folder. Let's call that folder "phalcon-devtools". Then from within your IDE: Preferences > Languages & Frameworks > PHP > Include Path > Add new > Specify other and choose the proper subfolder corresponding to the version of Phalcon you're using. (For example, phalcon-devtools/ide/2.0.5).

How to add functionality in payroll plugin of OrangeHrm?

I have made a "Payroll" module and the functionality of that module also made with php files but I need to integrate that php files into orange hrm. so now here the problem comes for because I can't understand where to start in orangehrm to integrate it. I know start from index.php after that edit where to get my module withing the footer and header of the OrangeHRM.
And can anyone explain me to find the path of this line
orangehrm is based in symfony (framework MVC), if you wanna add a module, need:
create a folder in (symfony\plugins...)
enable the plugin in setting.yml (\apps\orangehrm\config\setting.yml)
add the module in databases ( use phpmyadmin for this)
add the module in lib
logout, delete cache and login back.
this is way for 3.1 versions. That version of the software you are using?

Zend Framework: How to load existing project into ZF's CLI?

In ZF you create a project by running this command:
zf create project MyProjectName
But how does one load a project that already exists?
I don't see anything in the documentation that specifies a zf load project or zf set project or something like that.
Thanks.
This is not yet possible to my knowledge, but on the to-do list
See http://framework.zend.com/issues/browse/ZF-7940
You can simply create another zf project in a different directory and copy the xml file into the the folder where it's missing. in the xml file, everything is relative, so you don't have to worry about the newly dummy project's path and others.

Categories