Skip to content
FieldFrame-to-EE2 Data Converter
Find file
New pull request
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



FieldFrame-to-EE2 Data Converter

This class was made to be imported by an EE2 fieldtype within its install() function, to aid in converting its prior FieldFrame-based data over to the way EE2 expects.

TODO: Provide a second callback for converting array-based entry data which EE2’s field API does not support


If no changes will need to be made to your class name or individual field settings, you can simply run and return:

function install()
    if (! class_exists('FF2EE2')) require 'ff2ee2.php';
    $converter = new FF2EE2('class');
    return $converter->global_settings;

If your new class name differs from your old one, pass an array in the first parameter:

    $converter = new FF2EE2(array('old_class', 'new_class'));

If you need to make changes to individual field settings, pass a callback function in the second parameter:

    $converter = new FF2EE2('class', array(&$this, 'update_field_settings'));

The callback function you pass should accept two parameters, $field_settings and $field, and should return $field_settings

function update_field_settings($field_settings, $field)
    if (isset($field_settings['weblogs']))
        $field_settings['channels'] = $field_settings['weblogs'];
    return $field_settings;
Something went wrong with that request. Please try again.