O
O
Otrivin2020-04-21 20:23:05
Drupal
Otrivin, 2020-04-21 20:23:05

How do you make exported settings for modules in Drupal 7?

Hello!
I'm building a module on Drupal 7, in the process of creation it became necessary to export/import its configuration.
All settings are simple text fields/selects. In the body of the module, I get their values ​​​​through variable_get (), and work with the received ones.

Question: What is the easiest way to create an export/import of module parameters? In which direction to dig? I'm trying to understand this guide, but it seems to me that it can be somehow simpler.

for example
Например, для экспорта - собрать перечень параметров в массив, преобразовать в json и отдать пользователю. При импорте - то же, но наоборот. Проблема в том, что и в этом способе я не уверен с точки зрения костыльности + не знаю, как это реализовать - как добавить возможность запуска этих операций из админки

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andead, 2020-04-21
@Otrivin

https://www.drupal.org/project/strongarm
But it's better to switch to the eight, there are no more such problems.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question