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

Amigo 2019-08-16 12:37:03 +02:00
parent 8d3557a260
commit 681dcf8b64

@ -239,19 +239,21 @@ This View has an Access function, here all these Access levels can be set which
I am adding some Permissions to demonstrate the Permission Structure regarding the front end Management of Editing these items. I am going to use the Core. There is the option of using what is known as the 'view.edit' [00:41:22](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m22s) instead of 'core.edit' then it means its relationship is just for this view. If I want it to be related to the Core which means that it is not going to be only related to this view, but whatever I change in the Core will affect this view. For more explanation on the permissions, there is this tutorial which is available in the Description. Watch this tutorial and also maybe do some changes. Compile the Component and look at the code. [00:41:54](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m54s) The code really tells you what has been done. There are many ways to learn how JCB does things when you make changes and then to compile the component and to look at what has changed. Usually using something like Git will be very useful in discovering the changes. There is also a way for you to know where in the Compiler's specific code is being created which I will show you as we continue.
Since changes were made, save and close it. [00:42:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m36s) This will take us back to the Component where everything is still the way we left it. [00:43:04](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m04s) In the demonstration of a Hello World Component we have done quite enough regarding the back end. All that now remains is to compile. Click Save and Close, go to the Compiler and select the Component and Compile. That means that 9000 lines of code have just been written, 51 folders and 122 files were created.[00:43:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m36s) If we had to manually write all the classes and tables and stuff without the help of any boilerplate tool or wire script, it will take us 25 hours to do it.<<<<<<<<<
Since changes were made, save and close it. [00:42:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m36s) This will take us back to the Component where everything is still the way we left it. [00:43:04](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m04s) In the demonstration of a Hello World Component we have done quite enough regarding the back end. All that now remains is to compile. Click Save and Close, go to the Compiler and select the Component and Compile. That means that 9000 lines of code have just been written, 51 folders and 122 files were created.[00:43:36](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h43m36s) If we had to manually write all the classes and tables and stuff without the help of any boilerplate tool or wire script, it will take us 25 hours to do it. Just here JCB has saved you a lot of time.
### Installing The Component
[00:44:17](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m17s)
Now the Component can be installed by clicking this 'install com_hello_world_v2_0_0_J3_on this Joomla Website Button or grabbing the URL and going to the normal installer. Because it has Compiled a Shippable Joomla Component Package which can be installed on any Joomla Website.
Now the Component can be installed by clicking this 'install com_hello_world_v2_0_0_J3_on this Joomla Website' button or grabbing the URL and going to the normal installer. Because it has Compiled a ship-able Joomla Component Package which can be installed on any Joomla Website.
### Select An Image
[00:44:42](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h44m42s)
Now one thing I didn't do it, I didn't select a Component image. When we selected you see there is no image showing as there is with this one. So I think I want to quickly go back, I'm going to clear the temporary folder and just go select [00:45:01](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m01s) at least the Demo Components Image as our Hello World Component. So in the Component, there is this area to select an Image. I'm going to click select and I've selected the Demo Components Package so that we have something. I'm going to save and close again. Now go back to the Compiler and compile it again. I'm going to click on install. If I now go here we'll see that there is now a new Component in this Joomla Website. I'm going to open in a new tab. [00:45:45](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m45s) There we go we got our Component installed. It has a Greetings Tab and an Add Greetings Tab. We also have not selected images for those. Let's quickly do that. Going back to the Admin Views and then the Greetings I'm going to click on Greetings first as an Admin View. Here you see there is a place for Icons and the Add Icon. [00:46:13](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m13s) I'm going to select Icon. So I've selected this little bucket as the icon for Greetings. I'm going to just add one for adding a Greeting with a little green plus. Now we got it to icons. I'm going to click save and close. I've got Greetings [00:46:39](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m39s) set up and I'm going to go and compile this again. That's usually how things go. We go make a change, we come back to the Compiler to compile it, install it and go look at the Component. When it gets a little bit more advanced, we not only go and look at the Component in Joomla [00:47:03](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m03s) but we also go and look at the code. There we got it, the two icons are in place. If I click Add Greeting, we see that there's the Name, there are the Greetings. There's also all these other fields added by default. So the created and the Metadata and the Permissions are all in place. That is how you would set up a basic Hello World Component.
There is no image showing because a Component image has not been selected.(See video). Go back, and clear the temporary folder. [00:45:01](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m01s) For example, the Demo Components Image is selected as our Hello World Component. In the Component, there is a area to select an Image. Save and close again. Go back to the Compiler and compile it again and click 'Install'. Now there is a new Component in this Joomla Website. Open in a new tab. [00:45:45](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h45m45s) The Component has now been installed. It has a Greetings Tab and an Add Greetings Tab. There is no images selected for it. Going back to the Admin Views and then to Greetings and first click on Greetings as an Admin View. There is a place for Icons and the Add Icon. [00:46:13](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m13s) Select the bucket as the 'Icon' for 'Greetings' and another bucket with a little green plus is added for 'Add a Greeting'. Click Save and Close.<<<<<<<<<<<<<<
I've got Greetings [00:46:39](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h46m39s) set up and I'm going to go and compile this again. That's usually how things go. We go make a change, we come back to the Compiler to compile it, install it and go look at the Component. When it gets a little bit more advanced, we not only go and look at the Component in Joomla [00:47:03](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h47m03s) but we also go and look at the code. There we got it, the two icons are in place. If I click Add Greeting, we see that there's the Name, there are the Greetings. There's also all these other fields added by default. So the created and the Metadata and the Permissions are all in place. That is how you would set up a basic Hello World Component.
### Hello World Configuration