{"id":374818,"date":"2023-03-30T14:24:08","date_gmt":"2023-03-30T14:24:08","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=374818"},"modified":"2023-03-31T07:38:17","modified_gmt":"2023-03-31T07:38:17","slug":"create-module-configuration-using-symfony-services-and-components-in-prestashop-8","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/","title":{"rendered":"Create module configuration using Symfony services and components in PrestaShop 8"},"content":{"rendered":"\n<p>In this blog, we will learn how to create configurations using Symfony services and components and will define our own Symfony services in the module, and will use existing components.<\/p>\n\n\n\n<p>Here, we are showing the process step by step with an example module &#8216;<strong>wkcreatedemoproduct<\/strong>&#8216;<\/p>\n\n\n\n<p><strong>Step 1: Create the module class<\/strong><\/p>\n\n\n\n<p>here, we have created the module class file &#8220;<strong>wkcreatedemoproduct\/wkcreatedemoproduct.php<\/strong>&#8220;<\/p>\n\n\n\n<p>In this class, we are initializing the module, controllers tab, and redirecting the configuration page to modern page routes. <\/p>\n\n\n\n<p>Also, note that we are using a new translation system in this example module. Please refer to the <a href=\"https:\/\/devdocs.prestashop-project.org\/8\/modules\/creation\/module-translation\/new-system\/\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a> for more information.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">declare(strict_types=1);\n\nuse PrestaShop\\PrestaShop\\Adapter\\SymfonyContainer;\n\nclass WkCreateDemoProduct extends Module\n{\n    public function __construct()\n    {\n        $this-&gt;name = &#039;wkcreatedemoproduct&#039;;\n        $this-&gt;author = &#039;Webkul&#039;;\n        $this-&gt;version = &#039;1.0.0&#039;;\n        $this-&gt;need_instance = 0;\n\n        $this-&gt;bootstrap = true;\n        parent::__construct();\n\n        $this-&gt;displayName = $this-&gt;trans(&#039;Create demo products&#039;, &#091;], &#039;Modules.Wkcreatedemoproduct.Admin&#039;);\n        $this-&gt;description = $this-&gt;trans(\n            &#039;Module created for the Demo product creation purpose on PrestaShop store&#039;,\n            &#091;],\n            &#039;Modules.Wkcreatedemoproduct.Admin&#039;\n        );\n\n        $this-&gt;ps_versions_compliancy = &#091;&#039;min&#039; =&gt; &#039;8.0.0&#039;, &#039;max&#039; =&gt; &#039;8.99.99&#039;];\n    }\n\n    public function getTabs()\n    {\n        return &#091;\n            &#091;\n                &#039;class_name&#039; =&gt; &#039;AdminWkCreateDemoProduct&#039;, \/\/ Creating tab in admin menu\n                &#039;visible&#039; =&gt; true,\n                &#039;name&#039; =&gt; &#039;Demo Product Data&#039;,\n                &#039;parent_class_name&#039; =&gt; &#039;CONFIGURE&#039;,\n            ]\n        ];\n    }\n\n    public function getContent()\n    {\n        $route = SymfonyContainer::getInstance()-&gt;get(&#039;router&#039;)-&gt;generate(&#039;demo_product_configuration_form&#039;);\n        \/\/ redirecting to controller, symfony route\n        Tools::redirectAdmin($route);\n    }\n\n    public function isUsingNewTranslationSystem()\n    {\n        \/\/ Used this for new translations system, It will avoid redirection of translation page on legacy controller\n        return true;\n    }\n}<\/pre>\n\n\n\n<p><strong>Step 2: Define routes<\/strong><\/p>\n\n\n\n<p>Create routes.yml file inside the <strong>wkcreatedemoproduct\/config<\/strong> folder<\/p>\n\n\n\n<p>In this file, we have provided the path from the legacy controller to the modern page controller<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">demo_product_configuration_form:\n  path: \/wkcreatedemoproduct\/configuration\n  methods: &#091;GET, POST]\n  defaults:\n    _controller: &#039;PrestaShop\\Module\\WkCreateDemoProduct\\Controller\\DemoProductConfigurationController::index&#039;\n    # Needed to work with tab system\n    _legacy_controller: AdminWkCreateDemoProduct\n    _legacy_link: AdminWkCreateDemoProduct<\/pre>\n\n\n\n<p><strong>Step 3: Define services<\/strong><\/p>\n\n\n\n<p>Create a services.yml file inside the <strong>wkcreatedemoproduct\/config <\/strong>folder<\/p>\n\n\n\n<p>In the given code, we have defined our own services. These will be used for form creation and form handling. Each service is created inside the <strong>wkcreatedemoproduct\\Form<\/strong> folder<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">services:\n  _defaults:\n    public: true\n  prestashop.module.wkcreatedemoproduct.form.type.demo_configuration_text:\n    class: &#039;PrestaShop\\Module\\WkCreateDemoProduct\\Form\\DemoConfigurationTextType&#039;\n    parent: &#039;form.type.translatable.aware&#039;\n    public: true\n    tags:\n      - { name: form.type }\n\n  prestashop.module.wkcreatedemoproduct.form.demo_configuration_text_form_data_provider:\n    class: &#039;PrestaShop\\Module\\WkCreateDemoProduct\\Form\\DemoConfigurationTextFormDataProvider&#039;\n    arguments:\n      - &#039;@prestashop.module.wkcreatedemoproduct.form.demo_configuration_text_data_configuration&#039;\n\n  prestashop.module.wkcreatedemoproduct.form.demo_configuration_text_form_data_handler:\n    class: &#039;PrestaShop\\PrestaShop\\Core\\Form\\Handler&#039;\n    arguments:\n      - &#039;@form.factory&#039;\n      - &#039;@prestashop.core.hook.dispatcher&#039;\n      - &#039;@prestashop.module.wkcreatedemoproduct.form.demo_configuration_text_form_data_provider&#039;\n      - &#039;PrestaShop\\Module\\WkCreateDemoProduct\\Form\\DemoConfigurationTextType&#039;\n      - &#039;DemoConfiguration&#039;\n\n  prestashop.module.wkcreatedemoproduct.form.demo_configuration_text_data_configuration:\n    class: PrestaShop\\Module\\WkCreateDemoProduct\\Form\\DemoConfigurationTextDataConfiguration\n    arguments: &#091;&#039;@prestashop.adapter.legacy.configuration&#039;]<\/pre>\n\n\n\n<p><strong>Step: 4<\/strong> <strong>Create services class<\/strong><\/p>\n\n\n\n<p>Now create a service class in the <strong><strong>wkcreatedemoproduct\\Form<\/strong><\/strong> folder<\/p>\n\n\n\n<p>i) First service (demo_configuration_text) class DemoConfigurationTextType is created for form view<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">declare(strict_types=1);\n\nnamespace PrestaShop\\Module\\WkCreateDemoProduct\\Form;\n\nuse PrestaShopBundle\\Form\\Admin\\Type\\FormattedTextareaType;\nuse PrestaShopBundle\\Form\\Admin\\Type\\GeneratableTextType;\nuse PrestaShopBundle\\Form\\Admin\\Type\\MoneyWithSuffixType;\nuse Symfony\\Component\\Form\\Extension\\Core\\Type\\NumberType;\nuse PrestaShopBundle\\Form\\Admin\\Type\\TranslatableType;\nuse PrestaShopBundle\\Form\\Admin\\Type\\TranslatorAwareType;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\nuse Symfony\\Component\\Validator\\Constraints\\Length;\n\nclass DemoConfigurationTextType extends TranslatorAwareType\n{\n    \/**\n     * {@inheritdoc}\n     *\/\n    public function buildForm(FormBuilderInterface $builder, array $options): void\n    {\n        $builder\n            -&gt;add(&#039;product_name&#039;, TranslatableType::class, &#091;\n                &#039;label&#039; =&gt; $this-&gt;trans(&#039;First product name&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                &#039;required&#039; =&gt; true,\n                &#039;options&#039; =&gt; &#091;\n                    &#039;constraints&#039; =&gt; &#091;\n                        new Length(&#091;\n                            &#039;max&#039; =&gt; 128,\n                        ]),\n                    ],\n                ],\n            ])\n            -&gt;add(&#039;product_prefix&#039;, GeneratableTextType::class, &#091;\n                &#039;label&#039; =&gt; $this-&gt;trans(&#039;Name prefix&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                &#039;generated_value_length&#039; =&gt; 5,\n            ])\n            -&gt;add(&#039;product_short_desc&#039;, TranslatableType::class, &#091;\n                &#039;label&#039; =&gt; $this-&gt;trans(&#039;Product short description&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                &#039;type&#039; =&gt; FormattedTextareaType::class,\n                &#039;help&#039; =&gt; $this-&gt;trans(&#039;Character limit &lt; 21844 and text does not contains &lt;&gt;={}&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                &#039;required&#039; =&gt; true,\n                &#039;options&#039; =&gt; &#091;\n                    &#039;constraints&#039; =&gt; &#091;\n                        new Length(&#091;\n                            &#039;max&#039; =&gt; 21844,\n                        ]),\n                    ],\n                ],\n            ])\n            -&gt;add(&#039;product_qty&#039;, NumberType::class, &#091;\n                &#039;label&#039; =&gt; $this-&gt;trans(&#039;Product quantity&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                &#039;unit&#039; =&gt; &#039;unit&#039;,\n            ]);\n    }\n}<\/pre>\n\n\n\n<p>ii) Second service (demo_configuration_text_data_configuration) class DemoConfigurationTextDataConfiguration is created for the data process<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\ndeclare(strict_types=1);\n\nnamespace PrestaShop\\Module\\WkCreateDemoProduct\\Form;\n\nuse PrestaShop\\PrestaShop\\Core\\Configuration\\DataConfigurationInterface;\nuse PrestaShop\\PrestaShop\\Core\\ConfigurationInterface;\nuse PrestaShop\\PrestaShop\\Adapter\\Language\\LanguageDataProvider;\nuse Validate;\nuse Tools;\n\n\/**\n * Configuration is used to save data to configuration table and retrieve from it\n *\/\nfinal class DemoConfigurationTextDataConfiguration implements DataConfigurationInterface\n{\n    public const WK_PRODUCT_NAME = &#039;WK_DEMO_PRODUCT_WK_PRODUCT_NAME&#039;;\n    public const WK_PRODUCT_SHORT_DESC = &#039;WK_DEMO_PRODUCT_WK_PRODUCT_SHORT_DESC&#039;;\n    public const WK_PRODUCT_PREFIX = &#039;WK_DEMO_PRODUCT_WK_PRODUCT_PREFIX&#039;;\n    public const WK_PRODUCT_QTY = &#039;WK_DEMO_PRODUCT_WK_PRODUCT_QTY&#039;;\n    \/**\n     * @var ConfigurationInterface\n     *\/\n    private $configuration;\n\n    \/**\n     * @param ConfigurationInterface $configuration\n     *\/\n    public function __construct(ConfigurationInterface $configuration)\n    {\n        $this-&gt;configuration = $configuration;\n    }\n\n    \/**\n     * {@inheritdoc}\n     *\/\n    public function getConfiguration(): array\n    {\n        $return = &#091;];\n\n        if ($productName = $this-&gt;configuration-&gt;get(static::WK_PRODUCT_NAME)) {\n            $return&#091;&#039;product_name&#039;] = $productName;\n        }\n        if ($productShortDesc = $this-&gt;configuration-&gt;get(static::WK_PRODUCT_SHORT_DESC)) {\n            $return&#091;&#039;product_short_desc&#039;] = $productShortDesc;\n        }\n        if ($productPrefix = $this-&gt;configuration-&gt;get(static::WK_PRODUCT_PREFIX)) {\n            $return&#091;&#039;product_prefix&#039;] = $productPrefix;\n        }\n        if ($productQty = $this-&gt;configuration-&gt;get(static::WK_PRODUCT_QTY)) {\n            $return&#091;&#039;product_qty&#039;] = $productQty;\n        }\n\n        return $return;\n    }\n\n    \/**\n     * {@inheritdoc}\n     *\/\n    public function updateConfiguration(array $configuration): array\n    {\n        $errors = $this-&gt;validateConfiguration($configuration);\n        if (!empty($errors)) {\n            return $errors;\n        }\n        $this-&gt;configuration-&gt;set(static::WK_PRODUCT_NAME, $configuration&#091;&#039;product_name&#039;]);\n        $this-&gt;configuration-&gt;set(static::WK_PRODUCT_SHORT_DESC, $configuration&#091;&#039;product_short_desc&#039;], null, &#091;&#039;html&#039; =&gt; true]);\n        \/* Adding html =&gt; true allows for configuration-&gt;set to save HTML values *\/\n        $this-&gt;configuration-&gt;set(static::WK_PRODUCT_PREFIX, $configuration&#091;&#039;product_prefix&#039;]);\n        $this-&gt;configuration-&gt;set(static::WK_PRODUCT_QTY, $configuration&#091;&#039;product_qty&#039;]);\n\n        \/* Errors are returned here. *\/\n        return &#091;];\n    }\n\n    \/**\n     * Ensure the parameters passed are valid.\n     *\n     * @param array $configuration\n     *\n     * @return bool Returns array\n     *\/\n    public function validateConfiguration(array $configuration): array\n    {\n        $errors = &#091;];\n        $objLangDataProvider = new LanguageDataProvider();\n        $languages = $objLangDataProvider-&gt;getLanguages(false);\n        foreach ($languages as $lang) {\n            if (!trim($configuration&#091;&#039;product_name&#039;]&#091;$lang&#091;&#039;id_lang&#039;]])) {\n                $errors&#091;] = sprintf(\n                    $this-&gt;l(&#039;Product name is required in %s.&#039;),\n                    $lang&#091;&#039;name&#039;]\n                );\n            } elseif (!Validate::isCatalogName($configuration&#091;&#039;product_name&#039;]&#091;$lang&#091;&#039;id_lang&#039;]])) {\n                $errors&#091;] = sprintf(\n                    $this-&gt;l(&#039;Product name is not valid in %s.&#039;),\n                    $lang&#091;&#039;name&#039;]\n                );\n            } elseif (Tools::strlen($configuration&#091;&#039;product_name&#039;]&#091;$lang&#091;&#039;id_lang&#039;]]) &gt; 128) {\n                $this-&gt;errors&#091;] = sprintf(\n                    $this-&gt;trans(&#039;Product name is too long. It must have 128 character or less in %s.&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                    $lang&#091;&#039;name&#039;]\n                );\n            }\n            if (!trim($configuration&#091;&#039;product_short_desc&#039;]&#091;$lang&#091;&#039;id_lang&#039;]])) {\n                $errors&#091;] = sprintf(\n                    $this-&gt;trans(&#039;Product short description is required in %s.&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                    $lang&#091;&#039;name&#039;]\n                );\n            } elseif (!Validate::isCleanHtml($configuration&#091;&#039;product_short_desc&#039;]&#091;$lang&#091;&#039;id_lang&#039;]])) {\n                $errors&#091;] = sprintf(\n                    $this-&gt;trans(&#039;Product short description is not valid in %s.&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                    $lang&#091;&#039;name&#039;]\n                );\n            } elseif (Tools::strlen($configuration&#091;&#039;product_short_desc&#039;]&#091;$lang&#091;&#039;id_lang&#039;]]) &gt; 21844) {\n                $this-&gt;errors&#091;] = sprintf(\n                    $this-&gt;trans(&#039;Product short description too long. It must have 21844 character or less in %s.&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;),\n                    $lang&#091;&#039;name&#039;]\n                );\n            }\n            if (!$configuration&#091;&#039;product_qty&#039;]) {\n                $errors&#091;] = $this-&gt;trans(&#039;Product quantity is required.&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;);\n            } elseif (!Validate::isUnsignedInt($configuration&#091;&#039;product_qty&#039;])) {\n                $errors&#091;] = $this-&gt;trans(&#039;Product quantity is invalid.&#039;, &#039;Modules.Wkcreatedemoproduct.Admin&#039;);\n            }\n            return $errors;\n        }\n    }\n}<\/pre>\n\n\n\n<p>iii) Third service (demo_configuration_text_form_data_provider) class DemoConfigurationTextFormDataProvider is created for getter and setter purpose<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\ndeclare(strict_types=1);\n\nnamespace PrestaShop\\Module\\WkCreateDemoProduct\\Form;\n\nuse PrestaShop\\PrestaShop\\Core\\Configuration\\DataConfigurationInterface;\nuse PrestaShop\\PrestaShop\\Core\\Form\\FormDataProviderInterface;\n\n\/**\n * Provider ir responsible for providing form data, in this case it&#039;s as simple as using configuration to do that\n *\n * Class DemoConfigurationTextFormDataProvider\n *\/\nclass DemoConfigurationTextFormDataProvider implements FormDataProviderInterface\n{\n    \/**\n     * @var DataConfigurationInterface\n     *\/\n    private $demoConfigurationTextDataConfiguration;\n\n    \/**\n     * @param DataConfigurationInterface $demoConfigurationTextDataConfiguration\n     *\/\n    public function __construct(DataConfigurationInterface $demoConfigurationTextDataConfiguration)\n    {\n        $this-&gt;demoConfigurationTextDataConfiguration = $demoConfigurationTextDataConfiguration;\n    }\n\n    \/**\n     * {@inheritdoc}\n     *\/\n    public function getData(): array\n    {\n        return $this-&gt;demoConfigurationTextDataConfiguration-&gt;getConfiguration();\n    }\n\n    \/**\n     * {@inheritdoc}\n     *\/\n    public function setData(array $data): array\n    {\n        return $this-&gt;demoConfigurationTextDataConfiguration-&gt;updateConfiguration($data);\n    }\n}<\/pre>\n\n\n\n<p><strong>Step 5:<\/strong> <strong>Create a controller <\/strong><\/p>\n\n\n\n<p><strong>DemoProductConfigurationController<\/strong>  controller is created to handle the request, It must be inside the <strong>wkcreatedemoproduct\/src\/Controller<\/strong> folder<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">declare(strict_types=1);\n\nnamespace PrestaShop\\Module\\WkCreateDemoProduct\\Controller;\n\nuse PrestaShopBundle\\Controller\\Admin\\FrameworkBundleAdminController;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nclass DemoProductConfigurationController extends FrameworkBundleAdminController\n{\n    public function index(Request $request): Response\n    {\n        $textFormDataHandler = $this-&gt;get(&#039;prestashop.module.wkcreatedemoproduct.form.demo_configuration_text_form_data_handler&#039;);\n\n        $textForm = $textFormDataHandler-&gt;getForm();\n        $textForm-&gt;handleRequest($request);\n\n        if ($textForm-&gt;isSubmitted() &amp;&amp; $textForm-&gt;isValid()) {\n            \/** You can return array of errors in form handler and they can be displayed to user with flashErrors *\/\n            $errors = $textFormDataHandler-&gt;save($textForm-&gt;getData());\n            if (empty($errors)) {\n                $this-&gt;addFlash(&#039;success&#039;, $this-&gt;trans(&#039;Successful update.&#039;, &#039;Admin.Notifications.Success&#039;));\n\n                return $this-&gt;redirectToRoute(&#039;demo_product_configuration_form&#039;);\n            }\n\n            $this-&gt;flashErrors($errors);\n        }\n\n        return $this-&gt;render(&#039;@Modules\/wkcreatedemoproduct\/views\/templates\/admin\/form.html.twig&#039;, &#091;\n            &#039;demoConfigurationTextForm&#039; =&gt; $textForm-&gt;createView(),\n        ]);\n    }\n}<\/pre>\n\n\n\n<p><strong>Step 6:  Create view<\/strong><\/p>\n\n\n\n<p>Twig file <strong>form.html.twig <\/strong>path: wkcreatedemoproduct\/views\/templates\/admin\/<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{% extends &#039;@PrestaShop\/Admin\/layout.html.twig&#039; %}\n\n{# PrestaShop made some modifications to the way forms are displayed to work well with PrestaShop in order to benefit from those you need to use ui kit as theme#}\n{% form_theme demoConfigurationTextForm &#039;@PrestaShop\/Admin\/TwigTemplateForm\/prestashop_ui_kit.html.twig&#039; %}\n\n{% block content %}\n  {{ form_start(demoConfigurationTextForm) }}\n  &lt;div class=&quot;card&quot;&gt;\n    &lt;h3 class=&quot;card-header&quot;&gt;\n      &lt;i class=&quot;material-icons&quot;&gt;settings&lt;\/i&gt; {{ &#039;Demo products settings&#039;|trans({}, &#039;Modules.Wkcreatedemoproduct.Admin&#039;) }}\n    &lt;\/h3&gt;\n    &lt;div class=&quot;card-body&quot;&gt;\n      &lt;div class=&quot;form-wrapper&quot;&gt;\n        {{ form_widget(demoConfigurationTextForm) }}\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n    &lt;div class=&quot;card-footer&quot;&gt;\n      &lt;div class=&quot;d-flex justify-content-end&quot;&gt;\n        &lt;button class=&quot;btn btn-primary float-right&quot; id=&quot;save-button&quot;&gt;\n          {{ &#039;Create sample products&#039;|trans({}, &#039;Modules.Wkcreatedemoproduct.Admin&#039;) }}\n        &lt;\/button&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n  {{ form_end(demoConfigurationTextForm) }}\n{% endblock %}\n\n{% block javascripts %}\n  {{ parent() }}\n  &lt;script src=&quot;{{ asset(&#039;..\/modules\/wkcreatedemoproduct\/views\/js\/admin.js&#039;) }}&quot;&gt;&lt;\/script&gt;\n{% endblock %}<\/pre>\n\n\n\n<p><strong>Step 7:  Define the composer file<\/strong><\/p>\n\n\n\n<p>Create <strong>composer.json<\/strong> file for autoloading<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">{\n    &quot;name&quot;: &quot;prestashop\/wkcreatedemoproduct&quot;,\n    &quot;description&quot;: &quot;PrestaShop - DEMO Products&quot;,\n    &quot;license&quot;: &quot;AFL-3.0&quot;,\n    &quot;authors&quot;: &#091;{\n        &quot;name&quot;: &quot;Webkul&quot;\n    }],\n    &quot;autoload&quot;: {\n        &quot;psr-4&quot;: {\n            &quot;PrestaShop\\\\Module\\\\WkCreateDemoProduct\\\\&quot;: &quot;src\/&quot;\n        }\n    },\n    &quot;require&quot;: {\n        &quot;php&quot;: &quot;&gt;=7.1.0&quot;\n    },\n    &quot;config&quot;: {\n        &quot;preferred-install&quot;: &quot;dist&quot;,\n        &quot;prepend-autoloader&quot;: false\n    },\n    &quot;type&quot;: &quot;prestashop-module&quot;\n}<\/pre>\n\n\n\n<p><strong>Step 8: Installation<\/strong><\/p>\n\n\n\n<p>Copy created a module on the modules directory of PrestaShop and run the composer command <strong>composer install<\/strong> to install all dependencies. The complete module folder structure is attached in the screenshot.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png\" alt=\"screenshot-2023.03.30-17_37_48\" class=\"wp-image-374838\" width=\"817\" height=\"703\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png 580w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48-300x258.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48-250x215.png 250w\" sizes=\"(max-width: 817px) 100vw, 817px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>After installing the module, you will controller tab in the left menu sidebar and the configuration form<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1131\" height=\"300\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_42_07.png\" alt=\"screenshot-2023.03.30-17_42_07\" class=\"wp-image-374841\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_42_07.png 1131w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_42_07-300x80.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_42_07-250x66.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_42_07-768x204.png 768w\" sizes=\"(max-width: 1131px) 100vw, 1131px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1117\" height=\"555\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_46_01.png\" alt=\"screenshot-2023.03.30-17_46_01\" class=\"wp-image-374842\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_46_01.png 1117w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_46_01-300x149.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_46_01-250x124.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_46_01-768x382.png 768w\" sizes=\"(max-width: 1117px) 100vw, 1117px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>In the above example, we have created some fields using components, check the <a href=\"https:\/\/devdocs.prestashop-project.org\/8\/development\/components\/form\/types-reference\/\" target=\"_blank\" rel=\"noreferrer noopener\">documentation<\/a> for more information.<\/p>\n\n\n\n<p>That\u2019s all about this blog.<\/p>\n\n\n\n<p>If any issues or doubts please feel free to mention them in the comment section.<\/p>\n\n\n\n<p>I would be happy to help.<\/p>\n\n\n\n<p>Also, you can explore our&nbsp;<a href=\"https:\/\/webkul.com\/prestashop-development\/\">PrestaShop Development Services<\/a>&nbsp;&amp; a large range of quality&nbsp;<a href=\"https:\/\/store.webkul.com\/PrestaShop-Extensions.html\">PrestaShop Modules<\/a>.<\/p>\n\n\n\n<p>For any doubt contact us at&nbsp;<a href=\"mailto:support@webkul.com\">support@webkul.com<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we will learn how to create configurations using Symfony services and components and will define our own Symfony services in the module, and will use existing components. Here, we are showing the process step by step with an example module &#8216;wkcreatedemoproduct&#8216; Step 1: Create the module class here, we have created the <a href=\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":388,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2065,13904],"class_list":["post-374818","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-prestashop","tag-symfony-form"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create module configuration using Symfony services and components in PrestaShop 8 - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create module configuration using Symfony services and components in PrestaShop 8 - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"In this blog, we will learn how to create configurations using Symfony services and components and will define our own Symfony services in the module, and will use existing components. Here, we are showing the process step by step with an example module &#8216;wkcreatedemoproduct&#8216; Step 1: Create the module class here, we have created the [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-30T14:24:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-31T07:38:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png\" \/>\n<meta name=\"author\" content=\"Amit Kumar Tiwari\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amit Kumar Tiwari\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/\"},\"author\":{\"name\":\"Amit Kumar Tiwari\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/d9ce9e306c32df23a286ed9b5eb81257\"},\"headline\":\"Create module configuration using Symfony services and components in PrestaShop 8\",\"datePublished\":\"2023-03-30T14:24:08+00:00\",\"dateModified\":\"2023-03-31T07:38:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/\"},\"wordCount\":411,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png\",\"keywords\":[\"prestashop\",\"Symfony form\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/\",\"url\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/\",\"name\":\"Create module configuration using Symfony services and components in PrestaShop 8 - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png\",\"datePublished\":\"2023-03-30T14:24:08+00:00\",\"dateModified\":\"2023-03-31T07:38:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png\",\"width\":580,\"height\":499,\"caption\":\"screenshot-2023.03.30-17_37_48\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create module configuration using Symfony services and components in PrestaShop 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/d9ce9e306c32df23a286ed9b5eb81257\",\"name\":\"Amit Kumar Tiwari\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0bfab402e3d85cb3f1ed4fbac60ad1c4532edd47917a00da0f77d94c75b54f7d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0bfab402e3d85cb3f1ed4fbac60ad1c4532edd47917a00da0f77d94c75b54f7d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Amit Kumar Tiwari\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/amitkr-tiwari139\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create module configuration using Symfony services and components in PrestaShop 8 - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/","og_locale":"en_US","og_type":"article","og_title":"Create module configuration using Symfony services and components in PrestaShop 8 - Webkul Blog","og_description":"In this blog, we will learn how to create configurations using Symfony services and components and will define our own Symfony services in the module, and will use existing components. Here, we are showing the process step by step with an example module &#8216;wkcreatedemoproduct&#8216; Step 1: Create the module class here, we have created the [...]","og_url":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-03-30T14:24:08+00:00","article_modified_time":"2023-03-31T07:38:17+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png","type":"","width":"","height":""}],"author":"Amit Kumar Tiwari","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Amit Kumar Tiwari","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/"},"author":{"name":"Amit Kumar Tiwari","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/d9ce9e306c32df23a286ed9b5eb81257"},"headline":"Create module configuration using Symfony services and components in PrestaShop 8","datePublished":"2023-03-30T14:24:08+00:00","dateModified":"2023-03-31T07:38:17+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/"},"wordCount":411,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png","keywords":["prestashop","Symfony form"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/","url":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/","name":"Create module configuration using Symfony services and components in PrestaShop 8 - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png","datePublished":"2023-03-30T14:24:08+00:00","dateModified":"2023-03-31T07:38:17+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/screenshot-2023.03.30-17_37_48.png","width":580,"height":499,"caption":"screenshot-2023.03.30-17_37_48"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/create-module-configuration-using-symfony-services-and-components-in-prestashop-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create module configuration using Symfony services and components in PrestaShop 8"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/d9ce9e306c32df23a286ed9b5eb81257","name":"Amit Kumar Tiwari","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0bfab402e3d85cb3f1ed4fbac60ad1c4532edd47917a00da0f77d94c75b54f7d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0bfab402e3d85cb3f1ed4fbac60ad1c4532edd47917a00da0f77d94c75b54f7d?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Amit Kumar Tiwari"},"url":"https:\/\/webkul.com\/blog\/author\/amitkr-tiwari139\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/374818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/388"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=374818"}],"version-history":[{"count":13,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/374818\/revisions"}],"predecessor-version":[{"id":375035,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/374818\/revisions\/375035"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=374818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=374818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=374818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}