APF_Demo_ManageOptions_Import::replyToLoadTab PHP Method

replyToLoadTab() public method

Triggered when the tab is loaded.
public replyToLoadTab ( $oFactory )
    public function replyToLoadTab($oFactory)
    {
        add_action('do_' . $this->_sPageSlug . '_' . $this->_sTabSlug, array($this, 'replyToDoTab'));
        $oFactory->addSettingSections($this->_sPageSlug, array('section_id' => $this->_sSectionID, 'tab_slug' => $this->_sTabSlug, 'title' => __('Import Data', 'admin-page-framework-loader')));
        $oFactory->addSettingFields($this->_sSectionID, array('field_id' => 'import_format_type', 'title' => __('Import Format Type', 'admin-page-framework-loader'), 'type' => 'radio', 'description' => __('The text format type will not set the option values properly. However, you can see that the text contents are directly saved in the database.', 'admin-page-framework-loader'), 'label' => array('json' => __('JSON', 'admin-page-framework-loader'), 'array' => __('Serialized Array', 'admin-page-framework-loader'), 'text' => __('Text', 'admin-page-framework-loader')), 'default' => 'json'), array('field_id' => 'import_single', 'title' => __('Single Import Field', 'admin-page-framework-loader'), 'type' => 'import', 'description' => __('Upload the saved option data.', 'admin-page-framework-loader'), 'label' => __('Import Options', 'admin-page-framework-loader')));
        // import_format_{page slug}_{tab slug}
        add_filter("import_format_{$this->_sPageSlug}_{$this->_sTabSlug}", array($this, 'replyToModifyFormat'), 10, 2);
        // import_{instantiated class name}_{import section id}_{import field id}
        add_filter("import_{$this->_oFactory->oProp->sClassName}_{$this->_sSectionID}_import_single", array($this, 'replyToModifyImportData'), 10, 6);
    }