Expose a custom view filter based on custom field in another node I want an user configurable boolean view filter, displaying child nodes in an hierarchy based on a value, canDisplayOthers, in the master node.  The master/children are joined by a field setID.

I tried to do a self-join, adding a view relationship based on setID, but setID is not in the list of relationship fields.

Using Php, the recipe in:

https://ohthehugemanatee.org/blog/2013/12/26/44497-people-are-wrong-how-to-never-use-views-php/

says to use a handler.  My handler would return a boolean, something like:

class mymodule_handler_field_isDisplayable extends views_handler_field {
  /**
  * Render the name field.
  */
  public function render($values) {
    $value = $this-&gt;get_value($values);
    /*   
       How can I get current node ID (nid) here?

    */
  }
}


and a hook_views_data something like:

function mymodule_views_data() {
  // Basic table information.
  $data['mymodule_ToDisplay'] = array(
    'table' =&gt; array(
      'group' =&gt; t('Global'),
      'base' =&gt; array(
        'title' =&gt; t('ToDisplay')
        ),
      ),
    'name' =&gt; array(
      'title' =&gt; t('ToDisplay'),
      'field' =&gt; array(
        'handler' =&gt; 'mymodule_handler_field_isDisplayable',
      )
    ),
    'filter' =&gt; array(
    'handler' =&gt; 'views_handler_filter_boolean',
    )
  ); 
  return $data;
}


I can't figure out:


in mymodule_views_data, what is this thing called 'table'?
how do I get the setID or current nodeID into the mymodule_handler_field_isDisplayable function? 


In curiosity;
- what is the minimal hook_views_data?
- Where is a good place to find where hook_views* parameters are explained?

I am using drupal7 and views 3

ADDITION  15 July 2014

Geoff, below, kindly mentioned that the problem would be easier if I created a master node content type.  I created a masterNodeType content type, containing the fields:


setID
canDisplay


Now, masterNodeType and childNodeType have the common field, setID, but I can't see setID when I configure the view relationship.  How do I get setID, and/or masterNodeType into the view relationship?  What is the criteria for those view relationship components?
Thanks to the clues provided by Geoff in a comment, I found the answer.
My mistake, (doing too much work), was  to create my own foreign key, test_set_id.   Drupal uses node_reference fields for such joins. Using node reference, associated content can be directly accessed after adding the relationship in the set-up view screen, without any code.
I also ended up creating an additional master parent content type, to hold some generic test_set information, and to give the child nodes something to point to.