'new_field_value_is_empty_string' ) ; // ------------------------------------------------------------------------- // Make the required array. Eg:- // // $selected_datasets_dmdd = array( // // ... // // 'get_new_field_value_functions' => array( // // 'question_trial_mode_site' => array( // 'name' => '\\' . __NAMESPACE__ . '\\get_new_field_value_4_question_trial_mode_site' , // 'args' => array() // ) , // // ... // // ) // // ... // // ) // // ------------------------------------------------------------------------- $get_new_field_value_functions = array() ; // ------------------------------------------------------------------------- foreach ( $entries as $this_field_slug => $this_get_new_field_value_function_name ) { // --------------------------------------------------------------------- $get_new_field_value_functions[ $this_field_slug ] = array( 'name' => '\\' . __NAMESPACE__ . '\\' . $this_get_new_field_value_function_name , 'args' => NULL ) ; // --------------------------------------------------------------------- } // ------------------------------------------------------------------------- return $get_new_field_value_functions ; // ------------------------------------------------------------------------- } // ============================================================================= // new_field_value_is_empty_string() // ============================================================================= function new_field_value_is_empty_string( $core_plugapp_dirs , $loaded_datasets , $dataset_slug , $selected_datasets_dmdd , $record_indices_by_field_slug_to_add , $record_indices_by_field_slug_to_remove , $this_record , $field_slug_to_add , $get_new_field_value_function_args ) { // ------------------------------------------------------------------------- // ( // $core_plugapp_dirs , // $loaded_datasets , // $dataset_slug , // $selected_datasets_dmdd , // $record_indices_by_field_slug_to_add , // $record_indices_by_field_slug_to_remove , // $this_record , // $field_slug_to_add , // $get_new_field_value_function_args // ) // - - - - - - - - - - - - - - - - - - - - - - - - - // Returns the value for the specified field to be added to the // specified record. // // RETURNS // On SUCCESS // array( // $ok = TRUE // $new_field_value (any PHP type) // ) // // On FAILURE // array( // $ok = FALSE // $error_message STRING // ) // ------------------------------------------------------------------------- $new_field_value = '' ; // ------------------------------------------------------------------------- return array( TRUE , $new_field_value ) ; // ------------------------------------------------------------------------- } // ============================================================================= // That's that! // =============================================================================