function MenuTreeStorage::serializedFields

Same name in other branches
  1. 9 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::serializedFields()
  2. 8.9.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::serializedFields()
  3. 11.x 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 1161

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.