APF_Demo_AdvancedUsage_Verification_Field::__construct PHP Method

__construct() public method

Sets up a form section.
public __construct ( $oFactory )
    public function __construct($oFactory)
    {
        // Section
        $oFactory->addSettingSections($this->sPageSlug, array('section_id' => $this->sSectionID, 'tab_slug' => $this->sTabSlug, 'title' => __('Verify Submitted Data', 'admin-page-framework-loader'), 'description' => __('Show error messages when the user submits improper option value.', 'admin-page-framework-loader')));
        /*
         * Text area fields.
         */
        $oFactory->addSettingFields($this->sSectionID, array('field_id' => 'numeric', 'title' => __('Verify Text Input', 'admin-page-framework-loader'), 'type' => 'text', 'description' => __('Try setting a non numeric value here.', 'admin-page-framework-loader')), array('field_id' => 'other_text_field', 'title' => __('Other Field', 'admin-page-framework-loader'), 'type' => 'text', 'description' => __('This field will not be validated.', 'admin-page-framework-loader')), array('field_id' => 'verify_text_field_submit', 'type' => 'submit', 'save' => false, 'value' => __('Verify', 'admin-page-framework-loader')));
        add_filter('validation_' . $oFactory->oProp->sClassName . '_' . 'field_verification' . '_' . 'numeric', array($this, 'replyToValidateField'), 10, 4);
    }
APF_Demo_AdvancedUsage_Verification_Field