You are here

protected function MenuTreeStorage::serializedFields in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::serializedFields()

Determines serialized fields in the storage.

Return value

array A list of fields that are serialized in the database.

4 calls to MenuTreeStorage::serializedFields()
MenuTreeStorage::loadFullMultiple in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Loads all table fields for multiple menu link definitions by ID.
MenuTreeStorage::loadLinks in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Loads links in the given menu, according to the given tree parameters.
MenuTreeStorage::prepareLink in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Prepares a link by unserializing values and saving the definition.
MenuTreeStorage::preSave in core/lib/Drupal/Core/Menu/MenuTreeStorage.php
Fills in all the fields the database save needs, using the link definition.

File

core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 1189

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\Core\Menu

Code

protected function serializedFields() {
  if (empty($this->serializedFields)) {
    $schema = static::schemaDefinition();
    foreach ($schema['fields'] as $name => $field) {
      if (!empty($field['serialize'])) {
        $this->serializedFields[] = $name;
      }
    }
  }
  return $this->serializedFields;
}