Updated 013 dynamicGet (markdown)

Amigo 2019-06-18 09:20:22 +02:00
parent 7cb16221eb
commit 39259d6040
1 changed files with 2 additions and 6 deletions

@ -78,15 +78,11 @@ Then there is the 'Access'. We have a bunch of values that fire every time in a
That is setting up a 'getlistquery' with pagination through this ordering method we just says, use the 'a.ordering' [00:30:39](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m39s) and send. You can order all the items. Just add many as you like. Be sure that the table that you ordering, could even use a name. It could be a 'name' as an ordering table key. Then you could do a descending or ascending. It would be added to the query. [00:31:03](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m03s) That is also added ordering to the data set from your dynamic get method. Here with the joint view tables you can do very nice dependency calls from other tables in the back end, and bring the data together into one items array. [00:31:25](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m25s) That's what dynamic get is for. As it can be seen there is a main source on the model.
Then we have this other one called 'getpreacher'. [00:31:45](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m45s)That is another dynamic get function which we have looked at. It's called 'getpreacher'. If it is opened, it is a 'getcustom'. We gave it a custom name called 'getpreacher'.<<<<<<<<<<<<<<<<<
Then we have this other one called 'getpreacher'. [00:31:45](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m45s)That is another dynamic get function which we have looked at. It's called 'getpreacher'. If it is opened, it is a 'getcustom'. We gave it a custom name called 'getpreacher'. This is its relationships, in this instance it does not have any relationships. It does not link to other tables (See video) [00:32:04](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m04s) It simply gets the preachers details right there.(see video) But it has a filter which is basically using the same integer and access levels as the filters. It is using a 'where' and it can be seen that it is published, and that it does not need ordering, because it is one preacher. [00:32:41](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m41s) It doesn't have any global settings. That is 'getpreacher'. From this settings, Component Builder writes all this code. You'd see that we have this function everywhere called 'UIkitComp' and are we using a global static method, 'getuikitcomp'. It's a method that VDM has build. To get more acquinted with Uikit, go to 'getUIkit' or google it. It's a CSS JavaScript library, which really makes modeling of your views very easy. It has components that you can use, like tool tip and [00:33:45](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m45s) all these kind of models.<<<<
This is its relationships, So it basically having no [00:32:04](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m04s) relationship there. Neither here. It's not linking to other tables. It's simply getting the preachers details right there(see video) simple as that. But it has a filter which is basically using the same integer and access levels as the filters. It's also using a 'where' I suppose, yes published, and it doesn't need ordering, because it's just one preacher. [00:32:41](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m41s) It doesn't have any globally settings. That is getpreacher. From the this settings here, component builder writes all this code. You'd see that we have this function everywhere called UIkitComp.
Then we using a global static method, getuikitcomp. It's a method that I built if you know Uikit, if you don't know it, go to getUIkit or just google.com it. It's a JavaScript, HTML Library, CSS JavaScript library, which really makes modeling of your views very nice and easy. It has components that you can use, like tool tip, and model, [00:33:45](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m45s) all these kind of models. Gordian is another component. We don't load all of it's components every time. What we've done is we've written in PHP, a method that looks at fields that are text area fields. It's not looking at every field, is only looking at the text fields and editor fields. In this component we know that this description field, is a editor field, and so we are sending it to this(getuikitComp) method.
Cordian is another component. We don't load all of it's components every time. What we've done is we've written in PHP, a method that looks at fields that are text area fields. It's not looking at every field, is only looking at the text fields and editor fields. In this component we know that this description field, is a editor field, and so we are sending it to this(getuikitComp) method.
You can go look at this method in your helper class(sermondistributor). It has the classes that already has been identified which is what this [00:34:56](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m56s) initial this field name, field value model field value is actually holding. It's holding any component names that already has been identified. This gets pass also here(classes) with the content. Then we check in the content whether there is a class='uk-' and if it's not false, we start looping to check what are all the components that are in there. Here is the list of the components that are available. On-the-fly we are determining whether these components should be loaded. Just by looking at the content that was placed in the description field. Then we added back to this array(see video). It updates this, eventually you have an array of all those items. In the view, we go to the view, [00:36:00](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m00s) which in this case is going to be preacher. We open the view .HTML. We get to a place where everything is going to be happening. These are of the components that when component builder compiled the application, it looks inside of the content of your site view, as well as your custom admin view and it identify that these components must be loaded for uikit. It places it here dynamically but since you could've added some components inside of the script that is stored in the description area, it now has this getuikitcomponent which reach back into the model. In the model gets this variables value through a method which is here at the bottom of the page. There it is [00:37:04](https://www.youtube.com/watch?v=OPuCoxPW35s&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m04s) getuikitComp. Through this method it is reaching in getting that array. Once it has that array we check whether it is set. Whether it is an array and if it is an array we set it to the array that is already on this page. Then over here we loop through that array we load in those components, CSS and JavaScript as required.