< 022020-10-03⋎04 >

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
02:58*nickredmark[m] has joined
06:17*farmBOT has joined
07:43*mindcls[m] has quit (Ping timeout: 244 seconds)
16:46*skipper_is[m] has joined
16:49skipper_is[m]Good evening all o/
16:50skipper_is[m]I'm trying to hook into the animal's view/page thing
16:51skipper_is[m]trying to use the _entity_view_alter() hook but cannot seem to get anything to display..
16:51mstenta[m]Hi [skipper_is](matrix.to/#/@skipper_is:matrix.org)
16:52mstenta[m]Are you trying to add something new or change something already there?
16:52skipper_is[m]Add something new, I just put my DLWG patch into a separate module
16:52mstenta[m]For new stuff try this
16:52mstenta[m]api.drupal.org/api/drupal/core%21lib%21D
16:53skipper_is[m]With ENTITY_TYPE replaced by asset?
16:54mstenta[m]`farm_asset` yes
16:54mstenta[m]Then you can also add a check to make sure the bundle is `animal`
16:54skipper_is[m]Yea, I've got a if ($asset->type != 'animal') {
16:55skipper_is[m](With asset comming off of $asset = $build['#entity'];
16:58skipper_is[m]> The website encountered an unexpected error. Please try again later.
16:58skipper_is[m]I'll try that again...
16:59mstenta[m] /admin/reports/dblog will show the error
17:00skipper_is[m]It doesn't like trying to pull the #entity from the $build....
17:00skipper_is[m]if (empty($build['#entity'])) {
18:14skipper_is[m]I assume it is api.drupal.org/api/drupal/modules%21syst rather than the 8x version
18:14skipper_is[m]But I cannot seem to get either of them to behave
18:33skipper_is[m]couldn't get it to behave, so went back to hook entity_view_alter
18:33skipper_is[m]No idea why...
18:35skipper_is[m]But is there a way of seeing the weighting of the different elements of the view? For some reason -120 weighting puts it in #1 position
19:09*uploaded an image: image.png (132KiB) < matrix.org/_matrix/media/r0/download/mat >
19:09skipper_is[m]Why will you not go into column 2?!

< 022020-10-03⋏04 >