Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dar-otechestvu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Open-source
dar-otechestvu
Commits
69c1608e
Commit
69c1608e
authored
Jul 01, 2024
by
Sergey Shadrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#124455] 10.3.x updated
-Enable some modules and sync configs from our profile
parent
befce946
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
dar.install
profiles/dar/dar.install
+55
-0
No files found.
profiles/dar/dar.install
View file @
69c1608e
...
...
@@ -4,6 +4,7 @@
* Install, update and uninstall functions for the profilename install profile.
*/
use
Drupal\Core\Config\FileStorage
;
use
Drupal\node\Entity\Node
;
/**
...
...
@@ -24,3 +25,57 @@ function dar_install() {
\Drupal
::
configFactory
()
->
getEditable
(
'system.site'
)
->
set
(
'page.front'
,
'/node/'
.
$node
->
id
())
->
save
();
}
/**
* Update configs and install some new modules.
*/
function
dar_update_10001
(
&
$sandbox
)
{
$install_modules
=
[
'ban'
,
'better_exposed_filters'
,
'ckeditor5'
,
'csv_serialization'
,
'editor_advanced_link'
,
'field_group'
,
'flag'
,
'flood_control'
,
'honeypot'
,
'media_bulk_upload_dropzonejs'
,
'media_file_delete'
,
'menu_admin_per_menu'
,
'menu_link_content'
,
'menu_per_role'
,
'mobile_detect'
,
'optional_end_date'
,
'pathauto'
,
'select2'
,
'svg_image'
,
'taxonomy_access_fix'
,
'twig_attributes'
,
'twig_field_value'
,
'twig_tweak'
,
'views_aggregator'
,
'views_bulk_operations'
,
'xls_serialization'
,
];
\Drupal
::
service
(
'module_installer'
)
->
install
(
$install_modules
);
$config_path
=
\Drupal
::
service
(
'extension.list.module'
)
->
getPath
(
'dar'
)
.
'/config/install'
;
$source
=
new
FileStorage
(
$config_path
);
$config_storage
=
\Drupal
::
service
(
'config.storage'
);
$configs_to_update
=
[
'editor.editor.full_html'
,
'editor.editor.basic_html'
,
'editor.editor.webform_default'
,
'filter.format.basic_html'
,
'filter.format.full_html'
,
'filter.format.plain_text'
,
'filter.format.restricted_html'
,
'filter.format.webform_default'
,
'filter.settings'
,
'media_file_delete.settings'
,
];
foreach
(
$configs_to_update
as
$config_to_update
)
{
$config_storage
->
write
(
$config_to_update
,
$source
->
read
(
$config_to_update
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment