ConfigBase::MAX_NAME_LENGTH

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/ConfigBase.php \Drupal\Core\Config\ConfigBase::MAX_NAME_LENGTH
  2. 8.9.x core/lib/Drupal/Core/Config/ConfigBase.php \Drupal\Core\Config\ConfigBase::MAX_NAME_LENGTH
  3. 10 core/lib/Drupal/Core/Config/ConfigBase.php \Drupal\Core\Config\ConfigBase::MAX_NAME_LENGTH

The maximum length of a configuration object name.

Many filesystems (including HFS, NTFS, and ext4) have a maximum file name length of 255 characters. To ensure that no configuration objects incompatible with this limitation are created, we enforce a maximum name length of 250 characters (leaving 5 characters for the file extension).

See also

http://wikipedia.org/wiki/Comparison_of_file_systems

Configuration objects not stored on the filesystem should still be restricted in name length so name can be used as a Cache API key.

File

core/lib/Drupal/Core/Config/ConfigBase.php, line 58

Class

ConfigBase
Provides a base class for configuration objects with get/set support.

Namespace

Drupal\Core\Config

Code

const MAX_NAME_LENGTH = 250;

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