| [20:01:44] | * JustTB has quit (Ping timeout: 258 seconds) |
| [03:11:55] | * JustTB has joined #farmos |
| [03:12:51] | * h8x0rd has joined #farmos |
| [04:56:43] | * h8x0rd has quit (Ping timeout: 245 seconds) |
| [05:41:41] | * h8x0rd has joined #farmos |
| [09:17:32] | * h8x0rd has quit (Ping timeout: 245 seconds) |
| [09:27:16] | * h8x0rd has joined #farmos |
| [10:00:31] | <skipper_is[m]> | hook_farm_ui_entities() is for adding log categories? |
| [10:05:37] | <mstenta[m]> | skipper_is: ah not quite |
| [10:05:44] | <mstenta[m]> | i think it's hook_farm_log_categories() |
| [10:06:01] | <skipper_is[m]> | Ok, what is ui_entities adding? |
| [10:06:14] | <mstenta[m]> | yea |
| [10:06:15] | <mstenta[m]> | https://github.com/farmOS/farmOS/blob/7.x-1.x/modules/farm/farm_log/farm... |
| [10:06:49] | <mstenta[m]> | here's the doc for hook_ui_entities(): |
| [10:06:49] | <mstenta[m]> | https://github.com/farmOS/farmOS/blob/7.x-1.x/modules/farm/farm_ui/farm_... |
| [10:07:16] | <mstenta[m]> | that's more for telling farmOS's farm_ui module about entity types so that it can tie things together in the UI in a standard way |
| [10:07:37] | <mstenta[m]> | farm_ui is kind of a glue module that makes some consistent decisions about how farmOS will add to Drupal's default UI elements |
| [10:07:49] | <mstenta[m]> | you probably don't need to worry about it |
| [10:07:49] | <skipper_is[m]> | Trying to add to |
| [10:07:50] | <skipper_is[m]> | ACTION uploaded an image: image.png (22KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/aMaKtJaEpARyeiTR... > |
| [10:08:04] | <mstenta[m]> | OH you want to create a log TYPE... ? |
| [10:08:06] | <mstenta[m]> | not category |
| [10:08:09] | <skipper_is[m]> | Aah |
| [10:08:13] | <mstenta[m]> | (different things) :-) |
| [10:08:19] | <mstenta[m]> | adding log types is a lot more complicated |
| [10:08:47] | <mstenta[m]> | and in general i recommend using existing types rather than adding new ones |
| [10:08:52] | <mstenta[m]> | unless it's REALLY necessary |
| [10:10:34] | <skipper_is[m]> | Ok, so not just as simple as adding a hook for https://github.com/farmOS/farmOS/blob/7.x-1.x/modules/farm/farm_ui/farm_... |
| [10:10:45] | <mstenta[m]> | nope |
| [10:11:09] | <mstenta[m]> | That is just for telling the farm_ui module about the log types your module provides |
| [10:11:21] | <mstenta[m]> | but you still need to provide them yourself, which involves many other hooks |
| [10:11:35] | <skipper_is[m]> | Ah, you can't just use the views provided by Activity for example? |
| [10:11:48] | <mstenta[m]> | What do you mean? |
| [10:12:05] | <mstenta[m]> | Ah gotta run! Appointment... back later |
| [10:13:24] | <skipper_is[m]> | The UI module is putting things on the UI, yes? So from what I understood, adding the hook there creates another item on that type list, this is the 'view' => 'farm_plantings', option, which I assumed was the interface that you see/the form itself. |
| [10:13:53] | <skipper_is[m]> | ACTION sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/PsApkRwAiVoVAQAG... > |
| [10:14:12] | <skipper_is[m]> | Or in this one, I assumed it created a new log type, called Seeding, which when clicked would open farm_log_seeding view |
| [10:17:44] | <skipper_is[m]> | Im basing this off of Android app programming, where a view is a ui element like a buttonview, or scroll view... |
| [11:22:32] | * h8x0rd has quit (Ping timeout: 245 seconds) |
| [11:25:32] | * h8x0rd has joined #farmos |
| [11:35:37] | * h8x0rd has quit (Read error: Connection reset by peer) |
| [11:35:43] | * h8x0rd_ has joined #farmos |
| [11:42:43] | * h8x0rd has joined #farmos |
| [11:43:19] | <mstenta[m]> | skipper_is: ah yea a bit different in this context... |
| [11:43:44] | <mstenta[m]> | `view` refers to a list page created by the Drupal Views module https://drupal.org/project/views |
| [11:44:25] | <mstenta[m]> | So when you create a new log type, you also need to create a View of those those logs (eg: /farm/logs/activities) and then you tell farm_ui.module what log types your module provides, and what View to use for them |
| [11:44:59] | <mstenta[m]> | In the case of `view` farm_ui just uses that whenever it needs to create a link to the list of logs of that type |
| [11:45:07] | * h8x0rd_ has quit (Ping timeout: 258 seconds) |
| [11:45:20] | <mstenta[m]> | or include that View in another page (eg: in an asset page, it shows Views of logs associated with that asset) |
| [11:47:40] | * h8x0rd_ has joined #farmos |
| [11:48:05] | * h8x0rd has quit (Read error: Connection reset by peer) |
| [11:49:20] | * h8x0rd__ has joined #farmos |
| [11:52:04] | * h8x0rd_ has quit (Ping timeout: 246 seconds) |
| [12:06:09] | * ayushj_[m] has joined #farmos |
| [13:08:27] | <skipper_is[m]> | So, a view would also need to be created for each log type? Can't use another ones view? |
| [13:10:32] | <skipper_is[m]> | ACTION uploaded an image: Screenshot_20190807-181018_Chrome.jpg (411KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/VavHajYWSXFParKp... > |
| [13:10:35] | <skipper_is[m]> | Is this a view? |
| [13:19:14] | <mstenta[m]> | yes that's a View |
| [13:19:14] | <mstenta[m]> | (using Drupal parlance) :-) |
| [13:19:15] | <mstenta[m]> | if you go to /admin/structure/views, you'll see all the Views provided by farmOS |
| [13:19:16] | <mstenta[m]> | (you may need to enable the Views UI module to see that admin list) |
| [13:19:16] | <mstenta[m]> | Views is extremelly powerful |
| [13:19:17] | <mstenta[m]> | it's basically a UI-based query builder |
| [13:19:18] | <mstenta[m]> | which means you can add columns super easily through the UI |
| [13:19:50] | <mstenta[m]> | but BEFORE YOU DO, please understand: https://farmos.org/development/update-safety/ |
| [13:20:39] | <mstenta[m]> | the same warning applies to modifying existing log types and other configurations that farmOS comes with |
| [13:25:57] | <skipper_is[m]> | Ok, but that is mainly if I am using the view of another type? Or equally to own views? |
| [13:27:19] | <skipper_is[m]> | Is the form a view as well? |
| [13:27:21] | <skipper_is[m]> | ACTION uploaded an image: Screenshot_20190807-182703_Chrome.jpg (707KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/RCrlMVvbwqVocPwc... > |
| [13:27:22] | <skipper_is[m]> | This also defined in the view file? |
| [13:29:57] | <mstenta[m]> | nope, that is the "entity view" page |
| [13:30:09] | <mstenta[m]> | (stupid how similar the terminology is, i agree) |
| [13:30:20] | <mstenta[m]> | just think of Views as "lists of entities" |
| [13:30:30] | <mstenta[m]> | (Views with a capital V because it's the Views module) |
| [13:31:05] | <mstenta[m]> | > Ok, but that is mainly if I am using the view of another type? Or equally to own views? |
| [13:31:06] | <mstenta[m]> | not sure what you mean |
| [14:17:05] | * Unruly247 has joined #farmos |
| [15:32:00] | * UnrulyX has joined #farmos |
| [15:34:27] | * Unruly247 has quit (Ping timeout: 248 seconds) |
| [15:37:10] | * UnrulyX has quit (Remote host closed the connection) |