You are here

public function CatalogAdminController::repairField in Ubercart 8.4

Repairs the catalog taxonomy field if it is lost or deleted.

1 string reference to 'CatalogAdminController::repairField'
uc_catalog.routing.yml in uc_catalog/uc_catalog.routing.yml
uc_catalog/uc_catalog.routing.yml

File

uc_catalog/src/Controller/CatalogAdminController.php, line 17

Class

CatalogAdminController
Convenience methods for catalog administration.

Namespace

Drupal\uc_catalog\Controller

Code

public function repairField() {
  foreach (uc_product_types() as $type) {
    uc_catalog_add_node_type($type);
  }
  uc_catalog_add_image_field();
  $this
    ->messenger()
    ->addMessage($this
    ->t('The catalog taxonomy reference field has been repaired.'));
  return $this
    ->redirect('uc_store.admin');
}