You are here

public static function UtilsController::getEntityFieldNames in Gutenberg 8.2

Get a list of entity field names.

Parameters

\Drupal\Core\Entity\FieldableEntityInterface $entity: An entity instance.

Return value

array The field names.

2 calls to UtilsController::getEntityFieldNames()
gutenberg_form_node_form_alter in ./gutenberg.module
Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm.
UtilsController::getEntityTextFields in src/Controller/UtilsController.php
Get all the entity text fields.

File

src/Controller/UtilsController.php, line 101

Class

UtilsController
Utility controller.

Namespace

Drupal\gutenberg\Controller

Code

public static function getEntityFieldNames(FieldableEntityInterface $entity) {
  return array_keys($entity
    ->getFields());
}