You are here

public function BaseFieldDefinition::getPropertyNames in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Field/BaseFieldDefinition.php \Drupal\Core\Field\BaseFieldDefinition::getPropertyNames()

Returns the names of the field's subproperties.

A field is a list of items, and each item can contain one or more properties. All items for a given field contain the same property names, but the values can be different for each item.

For example, an email field might just contain a single 'value' property, while a link field might contain 'title' and 'url' properties, and a text field might contain 'value', 'summary', and 'format' properties.

Return value

string[] The property names.

Overrides FieldStorageDefinitionInterface::getPropertyNames

1 call to BaseFieldDefinition::getPropertyNames()
BaseFieldDefinition::getDefaultValue in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
Returns the default value for the field in a newly created entity.

File

core/lib/Drupal/Core/Field/BaseFieldDefinition.php, line 552
Contains \Drupal\Core\Field\BaseFieldDefinition.

Class

BaseFieldDefinition
A class for defining entity fields.

Namespace

Drupal\Core\Field

Code

public function getPropertyNames() {
  return array_keys($this
    ->getPropertyDefinitions());
}