Skip to content
Snippets Groups Projects
Verified Commit eeb7175a authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3512254 by sayan_k_dutta, catch, smustgrave: Deprecate #type fieldgroup

parent 914ecc3f
No related branches found
No related tags found
4 merge requests!5423Draft: Resolve #3329907 "Test2",!3478Issue #3337882: Deleted menus are not removed from content type config,!579Issue #2230909: Simple decimals fail to pass validation,!213Issue #2906496: Give Media a menu item under Content
Pipeline #465625 passed with warnings
Pipeline: drupal

#465639

    Pipeline: drupal

    #465634

      Pipeline: drupal

      #465629

        ......@@ -106,6 +106,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
        ]));
        }
        $form['#attached']['library'][] = 'core/drupal.fieldgroup';
        $form['#attached']['library'][] = 'system/drupal.system';
        // Add JavaScript time zone detection.
        $form['#attached']['library'][] = 'core/drupal.timezone';
        ......@@ -114,7 +115,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
        $form['#attached']['drupalSettings']['copyFieldValue']['edit-site-mail'] = ['edit-account-mail'];
        $form['site_information'] = [
        '#type' => 'fieldgroup',
        '#type' => 'fieldset',
        '#attributes' => ['class' => ['fieldgroup']],
        '#title' => $this->t('Site information'),
        '#access' => empty($install_state['config_install_path']),
        ];
        ......@@ -146,7 +148,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
        }
        $form['admin_account'] = [
        '#type' => 'fieldgroup',
        '#type' => 'fieldset',
        '#attributes' => ['class' => ['fieldgroup']],
        '#title' => $account_label,
        ];
        $form['admin_account']['account']['name'] = [
        ......@@ -170,7 +173,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
        ];
        $form['regional_settings'] = [
        '#type' => 'fieldgroup',
        '#type' => 'fieldset',
        '#attributes' => ['class' => ['fieldgroup']],
        '#title' => $this->t('Regional settings'),
        '#access' => empty($install_state['config_install_path']),
        ];
        ......@@ -189,7 +193,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {
        ];
        $form['update_notifications'] = [
        '#type' => 'fieldgroup',
        '#type' => 'fieldset',
        '#attributes' => ['class' => ['fieldgroup']],
        '#title' => $this->t('Update notifications'),
        '#description' => $this->t('When checking for updates, your site automatically sends anonymous information to Drupal.org. See the <a href="@update-module-docs" target="_blank">Update module documentation</a> for details.', ['@update-module-docs' => 'https://www.drupal.org/node/178772']),
        '#access' => empty($install_state['config_install_path']),
        ......
        ......@@ -15,10 +15,23 @@
        *
        * @see \Drupal\Core\Render\Element\Fieldset
        * @see \Drupal\Core\Render\Element\Details
        *
        * @deprecated in drupal:11.2.0 and is removed from drupal:12.0.0.
        * Use \Drupal\Core\Render\Element\Fieldset instead.
        *
        * @see https://www.drupal.org/node/3515272
        */
        #[RenderElement('fieldgroup')]
        class Fieldgroup extends Fieldset {
        /**
        * {@inheritdoc}
        */
        public function __construct(array $configuration, $plugin_id, $plugin_definition) {
        parent::__construct($configuration, $plugin_id, $plugin_definition);
        @trigger_error('The ' . __CLASS__ . ' element is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use ' . Fieldset::class . ' instead. See https://www.drupal.org/node/3515272', E_USER_DEPRECATED);
        }
        public function getInfo() {
        $info = parent::getInfo();
        $info['#attributes']['class'] = ['fieldgroup'];
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment