I have a form that is used to play a game (users select between one of two images multiple times) that utilizes a service class that manages loading images, calculating results, etc. How can I instance this service class one time so that it doesn't get re-instanced every time I rebuild the form, do you have to do it in form_state?
I was trying to do it in `__construct` because I thought that was only called when you first instanced the form, but when you rebuild the form it gets called again so my service class gets re-instanced.
The default Drupal logger is so inefficient it can't even print out an array containing two content-types, what gives? I'm trying to log an array that contains two content-types but I keep getting the error that I've ran out of memory, which is ridiculous because I currently have my setting at `512M`.
It seems crazy to me that it takes Drupal more than 512MB to log some text....
How to install CONTEXT FILTERS and CONNECTIONS in a view if a self-made entity is displayed in it, i.e. in fact, the view does not see anything other than the table fields, and I need to filter the displayed data by the current user. Please tell me how can I get the id of the current user to install the filter?
I am building a form that contains two image buttons and an undo button. The user clicks one of the two image button's and then the images are suppose to update to new images, and they do this about 60 times before we submit the results. The user can select the undo button to undo their last selection and select another one. This form is also displayed in a modal. However, I'm having some strange behavior with the images updating when you click the image...