As requested by Mohammed J. Razem

-------------------------------------------------------------

Screenshots from the Varbase Installation by the web interface

 Extra Features, Demo content

install Development tools

install Development tools selected

-------------------------------------------------------------

Installation with drush site-install from the terminal interface or Testing Robot servers

We could call the following for the equivalent of default UI installation:

drush site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=mysql://MYSQL_USER_NAME:MYSQL_PASSWORD@localhost/DATABASE_NAME varbase_multilingual_configration.enable_multilingual=true

As the View Mode inventory module will be enabled.

But If we want to not to install the View Mode Inventor module we could do the following:

drush site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=mysql://MYSQL_USER_NAME:MYSQL_PASSWORD@localhost/DATABASE_NAME varbase_multilingual_configration.enable_multilingual=true varbase_extra_components.vmi=false

If we want to install the Development tools we could do the following:

drush site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=mysql://MYSQL_USER_NAME:MYSQL_PASSWORD@localhost/DATABASE_NAME varbase_development_tools.varbase_development=true

As for that we could have them all or any custom new extra feature, demo content, or development tools in one command
drush site-install varbase --yes --site-name=Varbase4 --account-name=webmaster --account-pass=dD.123123ddd --account-mail=webmaster@vardot.com --db-url=mysql://MYSQL_USER_NAME:MYSQL_PASSWORD@localhost/DATABASE_NAME varbase_multilingual_configration.enable_multilingual=true varbase_extra_components.vmi=true varbase_extra_components.varbase_heroslider_media=true varbase_extra_components.varbase_carousels=true varbase_extra_components.varbase_search=true varbase_extra_components.varbase_demo=true varbase_development_tools.varbase_development=true -vvv

This will out an error as we do not have the varbase_demo module yet. so you will need to make sure that you do have the module and you add it in the targeted Extra Component, or Development tools installation step

-------------------------------------------------------------

ConfigBit and FormBit

Default varbase components

default.components.varbase.bit.yml

# ==============================================================================
# List of default varbase components, which they will be installed
# when we install varbase.
# ==============================================================================
config_bit:
  type: list
  for: varbase.info.yml
  when:
    install_default_components: true
    list:
      dependencies:
        - varbase_core
        - varbase_admin
        - varbase_total_control
        - varbase_security
        - varbase_seo
        - varbase_editor
        - varbase_media
        - varbase_webform
        - varbase_page
        - varbase_landing
        # Enable listed modules in order at this installation step. 
        - libraries

-------------------------------------------------------------

Extra Features Installation step

extra.components.varbase.bit.yml

# ==============================================================================
# List of extra varbase components, which they will be listed in the
# Extra components form, when we install varbase.
# ==============================================================================
config_bit:
  type: list
  for: varbase.info.yml
  when:
    show_extra_components: true
    list:
      dependencies:
        vmi:
          title: "View Modes Inventory"
          description: "The most common view modes you'll need for almost any site. This will provide you with a set of content <em>View Modes</em> for various teaser styles. All of which are mobile-first, media-aware, and ready for you to customize your site."
          selected: true
          config_form: false
        varbase_heroslider_media:
          title: "Media Hero Slider"
          description: "A rich hero slider that allows you to display video and/or image slides. It implements the universal \"Hero Slider\" to be used in your homepage. Built using <a href=\"https://www.drupal.org/project/slick\" target=\"_blank\">Slick Carousel</a>."
          selected: false
          config_form: false
        varbase_carousels:
          title: "Varbase Carousels"
          description: "Provides the necessary tools to build carousels in your website. You will be able to create carousels on the spot and place it anywhere in the site. Built using <a href=\"https://www.drupal.org/project/slick\" target=\"_blank\">Slick Carousel</a>."
          selected: false
          config_form: false
        varbase_search:
          title: "Varbase Search"
          description: "A suite of site search engine tools to help you build better search performance, customization, and search experience. Built using <a href=\"https://www.drupal.org/project/search_api\" target=\"_blank\">Search API</a>."
          selected: false
          config_form: false

-------------------------------------------------------------

Demo Content Installation step

If we switch show_demo: to true it will show up for the use in sub profiles, with demo or default content.
demo.content.varbase.bit.yml

# ==============================================================================
# List of varbase demo components, which they will be listed under the 
# Extra components installation step, in the Demo content section.
# ==============================================================================
config_bit:
  type: list
  for: varbase.info.yml
  when:
    show_demo: false
    list:
      dependencies:
        varbase_demo:
          title: "Install Demo Content"
          description: "If you're evaluating Varbase, installing demo content will help you get an idea of how Varbase works, and what features are included."
          selected: false
          config_form: false

-------------------------------------------------------------

Development tools Installation step

development.tools.varbase.bit.yml

# ==============================================================================
# List of development tools varbase, which they will be listed in the
# Development tools form, when we install varbase.
# ==============================================================================
config_bit:
  type: list
  for: varbase.info.yml
  when:
    show_development_tools: true
    list:
      dependencies:
        varbase_development:
          title: "Install Development Tools"
          description: "Install the development tools if you're a developer and you're going to use Varbase to build a new project. This will install several modules that help you build your site, such as <a href=\"https://www.drupal.org/project/devel\" target=\"_blank\">Devel</a>, <a href=\"https://www.drupal.org/docs/8/core/modules/dblog/overview\" target=\"_blank\">Database Logging</a>, and UI modules such as View UI, Features UI, Libraries UI, and Configuration Update Reports.<br /><em>Make sure to uninstall this feature and its modules when you go in production mode</em>."
          selected: false
          config_form: true
          formbit: "src/FormBit/varbase_development.formbit.php"

-------------------------------------------------------------

Varbase Development tools FormBit

varbase_development.formbit


use Drupal\Core\Form\FormStateInterface;

/**
 * Get editable config names.
 * 
 * @return array
 *   Array of config names, and list of values.
 */
function varbase_development_get_editable_config_names() {
  $editable_cofnigs = ['system.logging' => [
      'error_level' => ERROR_REPORTING_HIDE,
    ],
  ];

  return $editable_cofnigs;
}

/**
 * Build form bit.
 *
 * @param array $formbit
 * @param FormStateInterface $form_state
 * @param array $install_state
 */
function varbase_development_build_formbit(array &$formbit, FormStateInterface &$form_state, array &$install_state = NULL) {
  $formbit['error_level'] = [
    '#type' => 'radios',
    '#title' => t('Error messages to display'),
    '#default_value' => ERROR_REPORTING_HIDE,
    '#options' => [
      ERROR_REPORTING_HIDE => t('None'),
      ERROR_REPORTING_DISPLAY_SOME => t('Errors and warnings'),
      ERROR_REPORTING_DISPLAY_ALL => t('All messages'),
      ERROR_REPORTING_DISPLAY_VERBOSE => t('All messages, with backtrace information'),
    ],
    '#description' => t('It is recommended that sites running on production environments do not display any errors.'),
  ];
}

/**
 * Submit form bit with editable config values.
 * 
 * To update the editable config in drupal active config.
 * 
 * @param array $editable_config_values
 */
function varbase_development_submit_formbit(array $editable_config_values) {              
  $configFactory = \Drupal::configFactory()->getEditable('system.logging');
  $configFactory->set('error_level', $editable_config_values['system.logging']['error_level']);
  $configFactory->save(TRUE);
}

Comments

RajabNatshah created an issue. See original summary.

rajab natshah’s picture

Title: Change Installation Steps Add Descriptions for modules/features in the [Extra Component] step, with forms for custom configurations » Change Installation Steps: Extra components, Development tools, Add Descriptions for modules/features in the [Extra Component] step, with forms for custom configurations
rajab natshah’s picture

rajab natshah’s picture

  • RajabNatshah authored 8b15deb on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...

  • RajabNatshah committed 5d191ff on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...
rajab natshah’s picture

Assigned: rajab natshah » mohammed j. razem
Status: Needs work » Needs review
Issue tags: +varbase-8.4.06

  • RajabNatshah committed 0c61ca1 on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned

  • RajabNatshah committed 2c5db37 on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...
  • RajabNatshah committed cb9fb93 on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...

  • RajabNatshah committed 34a46d7 on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...

  • RajabNatshah committed d7bf11c on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...

  • RajabNatshah committed 6755b3b on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...
rajab natshah’s picture

Status: Needs review » Fixed

  • RajabNatshah committed 9a608c9 on 8.x-4.x
    Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation...
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Status: Fixed » Closed (fixed)
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes