Como Borrar Un Campo En Drupal Usando Devel PHP

En Drupal, hay muchas formas de eliminar un campo, si no puedes usar drush, puedes borrarlo usando Devel PHP.

use Drupal\field\Entity\FieldStorageConfig;
$field = FieldStorageConfig::loadByName('entity', 'field_name');
if ($field) {
// Delete this field.
$field->delete();
}

I write articles in English and Spanish, mostly about programming, technology, travel, money, investing. You can find me here: https://sergioguardiola.net

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store