Skip to content
Snippets Groups Projects
Commit d7bf11c3 authored by Rajab Natshah's avatar Rajab Natshah
Browse files

Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation Steps: ...

Issue #2898561 by RajabNatshah, Mohammed J. Razem: Change Installation Steps:  Extra components, Development tools, Add Descriptions for modules/features in the [Extra Component] step, with forms for custom configurations
parent 34a46d78
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@
namespace Drupal\varbase\config;
use Symfony\Component\Yaml\Yaml;
use Symfony\Component\Filesystem\Filesystem;
/**
* Defines config bit to help in managing custom config which used in install.
......@@ -64,8 +63,7 @@ class ConfigBit {
public static function doWeHaveThisConfigBit($config_bit_file_name, $type = 'profile', $project = 'varbase') {
// Generate full path to config file
$full_config_bit_file_name = drupal_get_path($type, $project) . '/' . $config_bit_file_name;
$fs = new Filesystem();
return $fs->exists($full_config_bit_file_name);
return file_exists($full_config_bit_file_name);
}
/**
......
......@@ -8,8 +8,6 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\StringTranslation\TranslationInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\varbase\Config\ConfigBit;
use Symfony\Component\Filesystem\Filesystem;
use Drupal\Component\Utility\Bytes;
/**
* Defines form for selecting extra components for the assembler to install.
......@@ -141,8 +139,7 @@ class AssemblerForm extends FormBase {
if (isset($extra_feature_info['formbit'])) {
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $extra_feature_info['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
include_once $formbit_file_name;
// Add configuration form element in the formbit position.
......@@ -205,8 +202,7 @@ class AssemblerForm extends FormBase {
if (isset($demo_content_info['formbit'])) {
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $demo_content_info['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
include_once $formbit_file_name;
// Add configuration form element in the formbit position.
......@@ -253,7 +249,7 @@ class AssemblerForm extends FormBase {
$extra_feature_info['config_form'] == TRUE) {
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $extra_feature_info['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
include_once $formbit_file_name;
$extra_features_editable_configs = call_user_func_array($extra_feature_key . "_get_editable_config_names", array());
......@@ -292,8 +288,7 @@ class AssemblerForm extends FormBase {
if (isset($demo_content_info['config_form']) &&
$demo_content_info['config_form'] == TRUE) {
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $demo_content_info['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
include_once $formbit_file_name;
$demo_content_editable_configs = call_user_func_array($demo_content_key . "_get_editable_config_names", array());
......
......@@ -8,8 +8,7 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\StringTranslation\TranslationInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\varbase\Config\ConfigBit;
use Symfony\Component\Filesystem\Filesystem;
use Drupal\Component\Utility\Bytes;
use Symfony\Component\Filesystem;
/**
* Defines form for selecting extra compoennts for the assembler to install.
......@@ -143,7 +142,7 @@ class DevelopmentToolsAssemblerForm extends FormBase {
if (isset($development_tool_info['formbit'])){
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $development_tool_info['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
include_once $formbit_file_name;
// Add configuration form element in the formbit position.
......@@ -187,8 +186,7 @@ class DevelopmentToolsAssemblerForm extends FormBase {
if (isset($development_tool_info['config_form']) &&
$development_tool_info['config_form'] == TRUE) {
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $development_tool_info['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
include_once $formbit_file_name;
$development_tools_editable_configs = call_user_func_array($development_tool_key . "_get_editable_config_names", array());
......
......@@ -107,7 +107,7 @@ class ScriptHandler {
*/
public static function removeGitDirectories() {
$drupal_root = static::getDrupalRoot(getcwd());
exec('find ' . $drupal_root . ' -name \'.git\' | xargs rm -rf');
exec("find " . $drupal_root . " -name '.git' | xargs rm -rf");
}
/**
......
......@@ -6,9 +6,7 @@
*/
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\Filesystem\Filesystem;
use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\Component\Utility\Bytes;
use Drupal\varbase\Config\ConfigBit;
use Drupal\varbase\Form\ConfigureMultilingualForm;
use Drupal\varbase\Form\AssemblerForm;
......@@ -133,9 +131,8 @@ function varbase_assemble_extra_components(array &$install_state) {
isset($extraFeatures[$extra_feature_key]['formbit'])) {
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $extraFeatures[$extra_feature_key]['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
// Added the selected extra feature configs to the batch process
// with the same function name in the formbit.
......@@ -185,8 +182,7 @@ function varbase_assemble_extra_components(array &$install_state) {
isset($demoContent[$demo_content_key]['formbit'])) {
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $demoContent[$demo_content_key]['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
// Added the selected development configs to the batch process
// with the same function name in the formbit.
......@@ -253,8 +249,7 @@ function varbase_assemble_development_tools(array &$install_state) {
isset($developmentTools[$development_tool_key]['formbit'])) {
$formbit_file_name = drupal_get_path('profile', 'varbase') . '/' . $developmentTools[$development_tool_key]['formbit'];
$formbit_file = new Filesystem();
if ($formbit_file->exists($formbit_file_name)) {
if (file_exists($formbit_file_name)) {
// Added the selected development configs to the batch process
// with the same function name in the formbit.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment