function Dependency::__sleep

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::__sleep()
  2. 10 core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::__sleep()
  3. 11.x core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::__sleep()

Prevents unnecessary serialization of constraint objects.

Return value

array The properties to serialize.

File

core/lib/Drupal/Core/Extension/Dependency.php, line 144

Class

Dependency
A value object representing dependency information.

Namespace

Drupal\Core\Extension

Code

public function __sleep() {
    return [
        'name',
        'project',
        'constraintString',
    ];
}

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