Add a NOT IN condition and a nested query to your views WHERE condition


I needed to add a NOT IN condition with a nested query for the WHERE condition. The usual method wont work


$view->query->where[1]['conditions'][] = array(
            ['field'] => 'groups_group_membership.type'
            ['value'] => array
                    [0] => 'SELECT_QUERY_HERE'

            ['operator'] => IN


The way that works


Symfony - assigning a value to a computed field on form submit event

Problem: I have a field in my schema that needs to have a value but I cannot make the user input the value in the form. I have to insert it when I am saving the object instance in the database. I can assign a value for this field using the user entered data in the form. How can I do this

Example: For examples sake say I have a filed called FullName, which I have to assign using the user inputs FirstName and LastName.

So basically  FullName = FirstName + " " + LastName.

Solution: Use a event listner  provided by the formBuilder object.