< 062019-08-07⋎08 >

farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Feature requests and bug reports: github.com/farmOS/farmOS/issuesSet by ChanServ on 2018-08-16 at 14:32
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:00skipper_is[m]hook_farm_ui_entities() is for adding log categories?
14:05mstenta[m]skipper_is: ah not quite
14:05mstenta[m]i think it's hook_farm_log_categories()
14:06skipper_is[m]Ok, what is ui_entities adding?
14:06mstenta[m]yea
14:06mstenta[m]github.com/farmOS/farmOS/blob/7.x-1.x/mo
14:06mstenta[m]here's the doc for hook_ui_entities():
14:06mstenta[m]github.com/farmOS/farmOS/blob/7.x-1.x/mo
14:07mstenta[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:07mstenta[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:07mstenta[m]you probably don't need to worry about it
14:07skipper_is[m]Trying to add to
14:07*uploaded an image: image.png (22KB) < matrix.org/_matrix/media/v1/download/mat >
14:08mstenta[m]OH you want to create a log TYPE... ?
14:08mstenta[m]not category
14:08skipper_is[m]Aah
14:08mstenta[m](different things) :-)
14:08mstenta[m]adding log types is a lot more complicated
14:08mstenta[m]and in general i recommend using existing types rather than adding new ones
14:08mstenta[m]unless it's REALLY necessary
14:10skipper_is[m]Ok, so not just as simple as adding a hook for github.com/farmOS/farmOS/blob/7.x-1.x/mo
14:10mstenta[m]nope
14:11mstenta[m]That is just for telling the farm_ui module about the log types your module provides
14:11mstenta[m]but you still need to provide them yourself, which involves many other hooks
14:11skipper_is[m]Ah, you can't just use the views provided by Activity for example?
14:11mstenta[m]What do you mean?
14:12mstenta[m]Ah gotta run! Appointment... back later
14:13skipper_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:14skipper_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:17skipper_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:43mstenta[m]skipper_is: ah yea a bit different in this context...
15:43mstenta[m]`view` refers to a list page created by the Drupal Views module drupal.org/project/views
15:44mstenta[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:44mstenta[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:45mstenta[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:08skipper_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:10skipper_is[m]Is this a view?
17:19mstenta[m]yes that's a View
17:19mstenta[m](using Drupal parlance) :-)
17:19mstenta[m]if you go to /admin/structure/views, you'll see all the Views provided by farmOS
17:19mstenta[m](you may need to enable the Views UI module to see that admin list)
17:19mstenta[m]Views is extremelly powerful
17:19mstenta[m]it's basically a UI-based query builder
17:19mstenta[m]which means you can add columns super easily through the UI
17:19mstenta[m]but BEFORE YOU DO, please understand: farmos.org/development/update-safety/
17:20mstenta[m]the same warning applies to modifying existing log types and other configurations that farmOS comes with
17:25skipper_is[m]Ok, but that is mainly if I am using the view of another type? Or equally to own views?
17:27skipper_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:27skipper_is[m]This also defined in the view file?
17:29mstenta[m]nope, that is the "entity view" page
17:30mstenta[m](stupid how similar the terminology is, i agree)
17:30mstenta[m]just think of Views as "lists of entities"
17:30mstenta[m](Views with a capital V because it's the Views module)
17:31mstenta[m]> Ok, but that is mainly if I am using the view of another type? Or equally to own views?
17:31mstenta[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)

< 062019-08-07⋏08 >