Updated 044 Hello World Component with Joomla Component Builder Creator Extended (markdown)

Amigo 2019-08-13 12:23:43 +02:00
parent 4556c77359
commit 11ab16b270

@ -112,19 +112,19 @@ Here you can see all the Fieldtypes that I have set up in JCB already. You could
[00:16:14](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m14s)
The way a Fieldtype works is that it helps you set up what is known as the Properties. The property has a Name, it has a Default value, it is either Adjustable or not Adjustable. It is Mandatory or not Mandatory and Translatable. It can be given a Description, that when the Fieldtype is used you can always come back to this. This information can be gathered from going through the Joomla Core Libraries. [00:16:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m49s) Because Fieldtypes are only mapping Joomla's own implementation of Fieldtypes. If a Fieldtype is opened that has already been created like the Text field, it may be seen that these properties are already there and in place. The Fieldtype is 'text'. The 'name' is 'any text'. When we say that the type is 'text', then this is not adjustable, but if it is adjustable, it can be ticked.[00:17:18](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m18s) It is most certainly Mandatory. This has been a brief overview on how to set up Fieldtypes.<<<<
The way a Fieldtype works is that it helps you set up what is known as the Properties. The property has a Name, it has a Default value, it is either Adjustable or not Adjustable. It is Mandatory or not Mandatory and Translatable. It can be given a Description, that when the Fieldtype is used you can always come back to this. This information can be gathered from going through the Joomla Core Libraries. [00:16:49](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m49s) Because Fieldtypes are only mapping Joomla's own implementation of Fieldtypes. If a Fieldtype is opened that has already been created like the Text field, it may be seen that these properties are already there and in place. The Fieldtype is 'text'. The 'name' is 'any text'. When we say that the type is 'text', then this is not adjustable, but if it is adjustable, it can be ticked.[00:17:18](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m18s) It is most certainly Mandatory. Most of the Fieldtypes had been created already and are ready to be used.
### Creating Fieldstypes
[00:17:37](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m37s)
[00:17:42](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m42s)
The fact that most of the Fieldtypes already are created and ready for you to use. You'd most of the time simply starts with Fields. There are quite a few Fields already here. But I'm going to go on as if they are not there. [00:17:52](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m52s) And I'm going to create two or three Fields that we can use in our Hello World Component. The first Field I'm going to create, click fon 'New', then I'm going to select 'Text' as my Fieldtype. The Field Information in the Fieldtype, Mandatory and everything, all this information, is brought in by Ajax from the Fieldtype.
Most of the time you can simply start with Fields. There are already quite a few Fields, but I am going to continue as if it does not exist, and create two or three Fields that can be used in our Hello World Component.[00:17:52](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m52s) To create the first Field: Click on 'New', then select 'Text' as the Fieldtype. All the Field Information is brought in by Ajax from the Fieldtype.
### Quick Demonstration On Adding A Fieldtype
[00:18:24](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m24s)
If I was to click on this button(pencil), to give you a quick demonstration, and I was to say change this(ValueExample) to text'tt' and save and close. Then go back to Fields and click 'New', then select [00:18:53](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m53s) Text field again. You'll see that now it added three t's in there. Because this whole structure is being built from the Fieldtypes Default Settings, which we just looked at. I'm going to go change that back quickly. I maybe just put a little something in the Description for you to see [00:19:22](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m22s) what I mean. Creating a field we haven't started with it, I've just been demonstrating the Fieldtype. I'm going to take text again, and you will see those oooo's are showing up here. This means that this whole area is dynamically populated from the values that are put up in the Fieldtype. And so is this XML(field definition) structure here usually populates the demo or default values that you added [00:19:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m57s) when you created the Fieldtype. The JCB ships with most Fieldtypes are already in place, it appears like this is something we have done, but it's something that you can extend and even change. For example if you know that the Text Fieldtype has more properties than we have setup, you can go in and add more to it. You can simply click on this edit here or before creating a Field, you can go to the Fieldtypes, and open the Text Fieldtype [00:20:34](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m34s) here and click the green button and add more Properties. Those Properties will dynamically also appear within the area where you Create the Fields. JCB is tried it's very best to be scaleble [00:20:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m57s) and customizable to your own desires, that it isn't just blocked in to what we have set hard into code. But it is movable and therefore scalable.
To give a quick demonstration: If I click on this button(pencil), and say; change this(ValueExample) to text'tt' and save and close and return to Fields and click 'New', then select 'Text field' again.[00:18:53](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m53s) Three t's has been added in there. Since this whole structure has been built from the Fieldtypes Default Settings, which we just looked at. I am going to change that back quickly, and for example put something in the Description. [00:19:22](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m22s) I am going to take text again, and you will see those oooo's are showing up here. This means that this whole area is dynamically populated from the values that are put up in the Fieldtype and so does this XML(field definition) structure usually populates the demo or default values that you have added when you created the Fieldtype.[00:19:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m57s) JCB ships with most Fieldtypes already in place, it appears like this is something we have done, but it is something that you can extend and even change. For example: If you know that the Text Fieldtype has more properties than we have setup, you can add more to it and simply click on this 'edit' or before creating a Field, you can go to the Fieldtypes, and open the Text Fieldtype and click on the green button and add more Properties.[00:20:34](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m34s) Those Properties will dynamically also appear within the area where the Fields are created. [00:20:57](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m57s) Things in JCB has not been set hard into code but is movable, easy to scale and to customize.<<<<<<<
### Creating A Field