I am declaring a condition in which I have the following parameters:
'node_type' => array( 'type' => 'text', 'label' => t('the node type'), 'options list' =>/*'entitystep_get_list_node_types'*/ 'node_type_get_names' , 'restriction' => 'input', ), 'node_field' => array( 'type' => 'text', //TODO: find or create node_field datatype? *node_element? 'label' => t('the node its field to be checked'), 'options list' => 'entitystep_get_fields'
// TODO: check how to pass a parameter to the entitystep_get_fields!!! ($node_type) ),
In the ‘entitystep_get_fields (on the bottom) I have to pass the selected node_type (=the first parameter)
These are the functions I need to call:
function entitystep_get_list_node_types() { $types = db_query("SELECT n.type FROM node_type"); return types; }
function entitystep_get_nodes_by_type($node_type) { $nodes = db_query(“SELECT * FROM node WHERE type=” . $node_type ); return $nodes; }