How to add a new directory in Magento 2.4.3 backend - magento2.4

How to add a new directory in Store-> Settings -> Configuration. I want to add a new directory with a php file Programatically

The better way to add new section in Store -> Settings -> Configuration is to create system.xml file in a new module.
https://devdocs.magento.com/guides/v2.4/config-guide/prod/config-reference-systemxml.html

Related

projects_default.yml file in thorntail

Thorntail generator does not generate any project_defaults.yml file in project structure. No resources folder also seen.Should we manually place this file to configure project properties?
Note : I am new to thorntail.
Yes, you need to create a file project-defaults.yml inside src/main/resources.

Spring Boot how to add another resources folder in test folder

Is it possible to add another resources folder in test folder, which will also be on the classpath?
I need it because I don't want to add application-test.properties file in default resources folder because it belongs in test folder.
I tried to add folder manually but it does not work.
I soloved this problem, in Intellij IDEA by:
Right clicking on the project -> Projectu structure,
and I marked newlycreated folder as Resources file.
It is gradle project or maven? If you have gradle just add the line below to the build.gradle file:
ext {
resourcesDir = projectDir.path + "/other/resources"
}
where the /other/resources is your dedicated resource folder

Not able to perform go-to-definition functionality in feature file to navigate to step definition file in a protractor-cucumber framework

Go-to-definition functionality not working on vs-code.
I have installed cucumber(gherkin) full support plugin.
Steps to replicate: Right click on steps on feature file and select go to definition.
Feature file
Gherkin code : When user access the Application
Step definition file
When('user access the Application', async function () {
await PageObject.open();
});
Expected: It should navigate to step-definitions file.
project folder structure
settings.json
install plugin: Cucumber (Gherkin) Full Support (Alexander Krechik)
create a folder: .vscode under project folder (don't in any subfolder)
create a file: settings.json under .vscode
In vscode, reopen the folder where .vscode insides to make settings take effect.
Following is the example project on my local and the go to definition worked well on it.
project folder structure
settings.json
{
"cucumberautocomplete.steps": [
"steps/*js"
],
"cucumberautocomplete.syncfeatures": "features/*feature",
"cucumberautocomplete.strictGherkinCompletion": true
}
(Remember change to your step definition and feature file path)

Create or copy files outside of target folders | Xcode 6 Custom Project Templates

I’m trying to create a custom Xcode 6 project template. Standard file layout when I create a project using Single View project looks like this:
ProjectName
—>ProjectName
—>ProjectName.xcodeproj
—>ProjectNameTests
How can I add files to this top level using the custom xcode template? I would like to add .gitignore and README.md files so it would look like this:
ProjectName
—>.gitignore
—>ProjectName
—>ProjectName.xcodeproj
—>ProjectNameTests
—>README.md

Automatically create new folder under images on module installation

Is it possible for a Joomla extension to automatically create a folder (event) under images -> /images/events/ when the user installs the extension inside Joomla Administrator ?
Inside your component's xml file you will need to add in the following attribute:
<installfile>install.componentname.php</installfile>
replace with the name of your component, this can be added just underneath the description attribute of your components install xml file.
Once this has been added you will need to create a file called "install.componentname.php", again replace componentname with the name of your component.
Inside this file add the following:
<?php
// no direct access
defined('_JEXEC') or die('Restricted Access');
// import joomla's filesystem classes
jimport('joomla.filesystem.folder');
// create a folder inside your images folder
if(JFolder::create(JPATH_ROOT.DS.'images'.DS.'events')) {
echo "Folder created successfully";
} else {
echo "Unable to create folder";
} ?>
Package this up and install, the install..php file should be at the top level of your zip archive. Lastly you will need to add this file to your components file list, just after the attribute add the following line:
<files>
<filename>install.componentname.php</filename>
</files>
If the folder is created successfully, it will say Folder created successfully.
you can specify a custom php script to be run at extension installation in your extension's manifest file [1, 2]. this script could create your folder /images/events/.
there are some differences in the installer between joomla 1.5 and 1.6:
1.5
you can only do this for components, not for modules or plugins
to specify your custom script, you use the <installfile/> section of the manifest file
1.6
besides for components, you can use a custom install script for modules and plugins, too
use the <scriptfile/> section of the manifest file
[...] i see another answer has been posted. have a look at it for 1.5; for 1.6, use <scriptfile/> and have a look at http://docs.joomla.org/Developers , especially http://docs.joomla.org/How_to_use_the_filesystem_package . the actual creation of the folder is left as an exercise for the reader.
<!-- Site Main Media File Copy Section -->
<media destination="com_helloworld">
<filename>image.png</filename>
<filename>flash.swf</filename>
</media>
http://docs.joomla.org/Components:xml_installfile

Resources