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