diff -u b/core/modules/field/field.attach.inc b/core/modules/field/field.attach.inc --- b/core/modules/field/field.attach.inc +++ b/core/modules/field/field.attach.inc @@ -113,34 +113,34 @@ * @todo Remove _field_invoke() and friends when field types and formatters are * turned into plugins. * - * @param $method + * @param string $method * The name of the method to invoke. - * @param $target + * @param Closure $target * A closure that receives an $instance object and returns the object on * which the method should be invoked. * @param Drupal\Core\Entity\EntityInterface $entity * The fully formed $entity_type entity. - * @param $a - * A parameter for the invoked method. - * @param $b - * A parameter for the invoked method. - * @param $options + * @param mixed $a + * A parameter for the invoked method. Defaults to NULL. + * @param mixed $b + * A parameter for the invoked method. Defaults to NULL. + * @param array $options * An associative array of additional options, with the following keys: - * - 'field_name': The name of the field whose operation should be invoked. By + * - field_name: The name of the field whose operation should be invoked. By * default, the operation is invoked on all the fields in the entity's - * bundle. NOTE: This option is not compatible with the 'deleted' option; the - * 'field_id' option should be used instead. - * - 'field_id': The id of the field whose operation should be invoked. By + * bundle. NOTE: This option is not compatible with the 'deleted' option; + * the 'field_id' option should be used instead. + * - field_id: The id of the field whose operation should be invoked. By * default, the operation is invoked on all the fields in the entity's' * bundles. - * - 'deleted': If TRUE, the function will operate on deleted fields as well as - * non-deleted fields. If unset or FALSE, only non-deleted fields are + * - deleted: If TRUE, the function will operate on deleted fields as well + * as non-deleted fields. If unset or FALSE, only non-deleted fields are * operated on. - * - 'langcode': A language code or an array of language codes keyed by field + * - langcode: A language code or an array of language codes keyed by field * name. It will be used to narrow down to a single value the available * languages to act on. */ -function field_invoke_method($method, Closure $target_closure, EntityInterface $entity, &$a = NULL, &$b = NULL, $options = array()) { +function field_invoke_method($method, \Closure $target_closure, EntityInterface $entity, &$a = NULL, &$b = NULL, $options = array()) { // Merge default options. $default_options = array( 'deleted' => FALSE,