AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator::addFields PHP Метод

addFields() публичный Метод

Adds form fields.
С версии: 3.5.4
public addFields ( $oFactory, $sSectionID ) : void
Результат void
    public function addFields($oFactory, $sSectionID)
    {
        $oFactory->addSettingFields($sSectionID, array('field_id' => 'version', 'title' => __('Version', 'admin-page-framework-loader'), 'type' => 'text', 'save' => false, 'value' => AdminPageFramework_Registry::VERSION, 'attributes' => array('size' => 20, 'readonly' => 'readonly')), array('field_id' => 'class_prefix', 'title' => __('Class Prefix', 'admin-page-framework-loader'), 'type' => 'text', 'tip' => array(__('Set alphanumeric characters for the class names.', 'admin-page-framework-loader'), __('For example, if you set here <code>MyPluginName_</code>, you will need to extend the class named <code>MyClassName_AdminPageFramework</code> instead of <code>AdminPageFramework</code>.', 'admin-page-framework-loader')), 'description' => 'e.g.<code>MyPluginName_</code>', 'attributes' => array('size' => 30, 'placeholder' => __('Type a prefix.', 'admin-page-framework-loader'))), array('field_id' => 'text_domain', 'title' => __('Text Domain', 'admin-page-framework-loader'), 'type' => 'text', 'tip' => __('The default text domain of your project.', 'admin-page-framework-loader'), 'description' => 'e.g.<code>my-plugin</code>', 'attributes' => array('size' => 40, 'placeholder' => __('Type your text domain.', 'admin-page-framework-loader'))), array('field_id' => 'components', 'title' => __('Components', 'admin-page-framework-loader'), 'type' => 'checkbox', 'description' => array(__('Select the components you would like to include in your framework files.', 'admin-page-framework-loader'), __('If you are not sure what to select, check them all.', 'admin-page-framework-loader')), 'label' => $this->_getComponentLabels(), 'default' => array_fill_keys(array_keys($this->_getComponentLabels()), true), 'select_all_button' => true, 'select_none_button' => true, 'label_min_width' => '100%', 'attributes' => array('core' => array('disabled' => 'disabled'))), array('field_id' => 'download', 'title' => __('Download', 'admin-page-framework-loader'), 'type' => 'export', 'label_min_width' => 0, 'order' => 100, 'value' => __('Download', 'adimn-page-framework-demo'), 'file_name' => 'admin-page-framework.zip', 'format' => 'text', 'description' => $oFactory->oUtil->getAOrB(class_exists('ZipArchive'), __('Download the compiled framework files as a zip file.', 'admin-page-framework-loader'), __('The zip extension needs to be enabled to use this feature.', 'admin-page-framework-loader')), 'attributes' => array('disabled' => $oFactory->oUtil->getAOrB(class_exists('ZipArchive'), null, 'disabled'))));
        new AdminPageFrameworkLoader_AdminPage_Tool_Generator_CustomFieldTypes($oFactory, $sSectionID);
    }