TabledragWarningCommand example


    }

    // Replace the whole table.     $response->addCommand(new ReplaceCommand('#field-display-overview-wrapper', $form['fields']));

    // Add "row updated" warning after the table has been replaced.     if (!in_array($op['cancel', 'edit'])) {
      foreach ($updated_rows as $name) {
        // The ID of the rendered table row is `$name` processed by getClass().         // @see \Drupal\field_ui\Element\FieldUiTable::tablePreRender         $response->addCommand(new TabledragWarningCommand(Html::getClass($name), 'field-display-overview'));
      }
    }

    return $response;
  }

  /** * Returns the extra fields of the entity type and bundle used by this form. * * @return array * An array of extra field info. * * @see \Drupal\Core\Entity\EntityFieldManagerInterface::getExtraFields() */
Home | Imprint | This part of the site doesn't use cookies.