function EntityRevisionConverter::convert

Overrides EntityConverter::convert

File

core/modules/content_moderation/src/ParamConverter/EntityRevisionConverter.php, line 22

Class

EntityRevisionConverter
Defines a class for making sure the edit-route loads the current draft.

Namespace

Drupal\content_moderation\ParamConverter

Code

public function convert($value, $definition, $name, array $defaults) {
    if (!empty($definition['load_pending_revision'])) {
        @trigger_error('The load_pending_revision flag has been deprecated. You should use load_latest_revision instead.', E_USER_DEPRECATED);
        $definition['load_latest_revision'] = TRUE;
    }
    return parent::convert($value, $definition, $name, $defaults);
}

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