As requested by Mohammed J. Razem
- Two separate steps: 1) Extra components 2) Development tools
- Extra components: two separate fieldsets: 1) Extra features 2) Demo content
- Each checkbox, will have description under it, and possibility for settings form. For now, please create any setting for 1 extra component for evaluation purposes only. We will NOT have a real setting - at least for now.
- #2898444: Order extra components by the default order in the Configbit YAML instead of alphabetical.
-------------------------------------------------------------
Screenshots from the Varbase Installation by the web interface



-------------------------------------------------------------
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
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);
}
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | install-Development-tools-selected--varbase4c.png | 652.02 KB | rajab natshah |
| #5 | install-Development-tools--varbase4c.png | 528.66 KB | rajab natshah |
| #5 | install-Extra-components--varbase4c.png | 745.09 KB | rajab natshah |
Comments
Comment #2
rajab natshahComment #3
rajab natshahComment #5
rajab natshahComment #8
rajab natshahComment #10
rajab natshahComment #15
rajab natshahComment #17
rajab natshahComment #18
rajab natshahComment #19
rajab natshahComment #20
rajab natshahComment #21
rajab natshahComment #22
rajab natshahComment #23
rajab natshahComment #24
rajab natshah