Overview

Classes

  • Quform
  • Quform_Admin_InsertForm
  • Quform_Admin_Page
  • Quform_Admin_Page_Controller
  • Quform_Admin_Page_Dashboard
  • Quform_Admin_Page_Entries
  • Quform_Admin_Page_Entries_Edit
  • Quform_Admin_Page_Entries_List
  • Quform_Admin_Page_Entries_View
  • Quform_Admin_Page_Factory
  • Quform_Admin_Page_Forms_Add
  • Quform_Admin_Page_Forms_Edit
  • Quform_Admin_Page_Forms_List
  • Quform_Admin_Page_Help
  • Quform_Admin_Page_Preview
  • Quform_Admin_Page_Settings
  • Quform_Admin_Page_Tools
  • Quform_Admin_Page_Tools_ExportEntries
  • Quform_Admin_Page_Tools_ExportForm
  • Quform_Admin_Page_Tools_Home
  • Quform_Admin_Page_Tools_ImportForm
  • Quform_Admin_Page_Tools_Migrate
  • Quform_Admin_Page_Tools_Uninstall
  • Quform_Api
  • Quform_Block
  • Quform_Builder
  • Quform_Captcha
  • Quform_ClassLoader
  • Quform_Confirmation
  • Quform_Container
  • Quform_Dashboard_Widget
  • Quform_Dispatcher
  • Quform_Element
  • Quform_Element_Captcha
  • Quform_Element_Checkbox
  • Quform_Element_Column
  • Quform_Element_Container
  • Quform_Element_Container_Iterator
  • Quform_Element_Date
  • Quform_Element_Email
  • Quform_Element_Factory
  • Quform_Element_Field
  • Quform_Element_File
  • Quform_Element_Group
  • Quform_Element_Hidden
  • Quform_Element_Honeypot
  • Quform_Element_Html
  • Quform_Element_Multi
  • Quform_Element_Multiselect
  • Quform_Element_Name
  • Quform_Element_Page
  • Quform_Element_Password
  • Quform_Element_Radio
  • Quform_Element_Recaptcha
  • Quform_Element_Row
  • Quform_Element_Select
  • Quform_Element_Submit
  • Quform_Element_Text
  • Quform_Element_Textarea
  • Quform_Element_Time
  • Quform_Entry_Controller
  • Quform_Entry_Exporter
  • Quform_Entry_List_Settings
  • Quform_Entry_List_Table
  • Quform_Entry_Processor
  • Quform_Entry_UserSearcher
  • Quform_Filter_Abstract
  • Quform_Filter_Alpha
  • Quform_Filter_AlphaNumeric
  • Quform_Filter_Digits
  • Quform_Filter_Regex
  • Quform_Filter_Static
  • Quform_Filter_StripTags
  • Quform_Filter_Trim
  • Quform_Form
  • Quform_Form_Controller
  • Quform_Form_Exporter
  • Quform_Form_Factory
  • Quform_Form_Importer
  • Quform_Form_Iterator
  • Quform_Form_List_Settings
  • Quform_Form_List_Table
  • Quform_Form_Processor
  • Quform_License
  • Quform_Migrator
  • Quform_NonceRefresher
  • Quform_Notification
  • Quform_Notification_Resender
  • Quform_Options
  • Quform_Permissions
  • Quform_Repository
  • Quform_ScriptLoader
  • Quform_Session
  • Quform_Settings
  • Quform_Shortcode
  • Quform_Themes
  • Quform_TokenReplacer
  • Quform_Toolbar
  • Quform_Translations
  • Quform_Updater
  • Quform_Upgrader
  • Quform_Uploader
  • Quform_Validator_Abstract
  • Quform_Validator_Alpha
  • Quform_Validator_AlphaNumeric
  • Quform_Validator_Array
  • Quform_Validator_Captcha
  • Quform_Validator_Date
  • Quform_Validator_Digits
  • Quform_Validator_Duplicate
  • Quform_Validator_Email
  • Quform_Validator_FileUpload
  • Quform_Validator_GreaterThan
  • Quform_Validator_Honeypot
  • Quform_Validator_Identical
  • Quform_Validator_InArray
  • Quform_Validator_Length
  • Quform_Validator_LessThan
  • Quform_Validator_Recaptcha
  • Quform_Validator_Regex
  • Quform_Validator_Required
  • Quform_Validator_Static
  • Quform_Validator_Time
  • Quform_View
  • Quform_ViewFactory
  • Quform_Widget_Form
  • Quform_Widget_Popup

Interfaces

  • Quform_Attachable
  • Quform_Element_Editable
  • Quform_Filter_Interface
  • Quform_Validator_Interface
  • Overview
  • Class

Class Quform_Migrator

Copyright: Copyright (c) 2009-2022 ThemeCatcher (https://www.themecatcher.net)
Located at Quform/Migrator.php
Methods summary
public
# __construct( Quform_Repository $repository, Quform_Builder $builder, Quform_ScriptLoader $scriptLoader, Quform_Options $options, Quform_Form_Factory $formFactory )

Parameters

$repository
$builder
$scriptLoader
$options
$formFactory
public
# getAllFormIds( )

Handle the request to get all 1.x form IDs via Ajax

Handle the request to get all 1.x form IDs via Ajax

public
# migrateForm( )

Handle the request to migrate a 1.x form via Ajax

Handle the request to migrate a 1.x form via Ajax

protected array
# convertForm( array $form )

Convert the given 1.x form config to a 2.x form config

Convert the given 1.x form config to a 2.x form config

Parameters

$form

Returns

array
protected string
# getTooltipClasses( array $form )

Get the tooltip classes

Get the tooltip classes

This option did not exist in 1.x

Parameters

$form

Returns

string
protected string
# convertPlaceholders( string $value )

Convert 1.x placeholders to 2.x in the given value

Convert 1.x placeholders to 2.x in the given value

Parameters

$value

Returns

string
protected array
# setPositionData( array $config )

Set the parentId and position values of children of the given form config

Set the parentId and position values of children of the given form config

Parameters

$config

Returns

array
protected array
# setContainerPositionData( array $container )

Set the parentId and position values of children of the given container config

Set the parentId and position values of children of the given container config

Parameters

$container

Returns

array
protected array
# convertLogic( array $config, array $allOptions )

Convert all logic rules to new format

Convert all logic rules to new format

Logic in 1.x used option values, logic in 2.x uses option IDs

Parameters

$config
The form config in 2.x format
$allOptions
All options within the new form as a flat array

Returns

array
protected array
# convertContainerLogic( array $container, array $allOptions )

Convert the logic rules for elements in the given container rules to the new format

Convert the logic rules for elements in the given container rules to the new format

Parameters

$container
The container element
$allOptions
All options within the new form as a flat array

Returns

array
protected array
# setLogicRuleOptionId( array $rule, array $allOptions )

Set the option ID on the given logic rule

Set the option ID on the given logic rule

Parameters

$rule
The logic rule data
$allOptions
All options within the new form as a flat array

Returns

array
protected array
# convertStyles( array $styles, boolean $isElement = true )

Convert the given styles to the new format

Convert the given styles to the new format

Parameters

$styles
The styles array
$isElement
True for element styles, false for form styles

Returns

array
protected string
# convertStyleType( string $type, boolean $isElement )

Convert the given styles to the new format

Convert the given styles to the new format

Parameters

$type
The style type
$isElement
True for element styles, false for form styles

Returns

string
protected array
# convertLogicRules( array $logicRules )

Convert the given logic rules to the new format

Convert the given logic rules to the new format

Parameters

$logicRules

Returns

array
protected array
# convertFilters( array $filters )

Convert the given logic rules to the new format

Convert the given logic rules to the new format

Parameters

$filters

Returns

array
protected array
# convertValidators( array $validators )

Convert the given logic rules to the new format

Convert the given logic rules to the new format

Parameters

$validators

Returns

array
protected array
# createPreventDuplicatesValidator( string $message )

Create a duplicate validator config and set the error message if not empty

Create a duplicate validator config and set the error message if not empty

Parameters

$message

Returns

array
protected mixed
# hexToRgb( string $hex )

Credit: https://stackoverflow.com/a/31934345/1915260

Credit: https://stackoverflow.com/a/31934345/1915260

Parameters

$hex

Returns

mixed
protected
# migrateEntries( array $oldConfig, array $newConfig )

Migrate the entries for the given form

Migrate the entries for the given form

Parameters

$oldConfig
The old form config
$newConfig
The new form config
protected string
# convertEntryValue( Quform_Element $element, string $value )

Convert a 1.x entry data value to the new format

Convert a 1.x entry data value to the new format

Parameters

$element
$value

Returns

string
protected string
# undoEscHtml( string $value )

Perform the opposite of esc_html on $value and return it

Perform the opposite of esc_html on $value and return it

Parameters

$value

Returns

string
protected
# validateMigrateFormRequest( )
public
# migrateImportForm( )

Handle the request to import a 1.x form

Handle the request to import a 1.x form

protected
# validateMigrateImportFormRequest( )

Validate the request to import a 1.x form

Validate the request to import a 1.x form

public
# migrateSettings( )

Handle the request to migrate the plugin settings

Handle the request to migrate the plugin settings

protected
# validateMigrateSettingsRequest( )

Validate the request to migrate the plugin settings

Validate the request to migrate the plugin settings

public array
# get1xForms( )

Get forms from the 1.x plugin version

Get forms from the 1.x plugin version

Returns

array
public array
# get1xForm( integer $formId )

Get forms from the 1.x plugin version

Get forms from the 1.x plugin version

Parameters

$formId

Returns

array
Properties summary
protected Quform_Repository $repository
#
protected Quform_Builder $builder
#
protected Quform_ScriptLoader $scriptLoader
#
protected Quform_Options $options
#
protected Quform_Form_Factory $formFactory
#
API documentation generated by ApiGen