diff --git a/core/modules/file/file.module b/core/modules/file/file.module index 5c14a68..06e71ae 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -49,42 +49,6 @@ function file_help($route_name, RouteMatchInterface $route_match) { } /** - * Implements hook_element_info(). - * - * The managed file element may be used anywhere in Drupal. - * - * @todo Remove once https://www.drupal.org/node/2326409 is in. - */ -function file_element_info() { - $types['managed_file'] = array( - '#input' => TRUE, - '#value_callback' => '\Drupal\file\Element\ManagedFile::valueCallback', - '#process' => array( - '\Drupal\file\Element\ManagedFile::processManagedFile', - ), - '#element_validate' => array( - '\Drupal\file\Element\ManagedFile::validateManagedFile', - ), - '#pre_render' => array( - '\Drupal\file\Element\ManagedFile::preRenderManagedFile', - ), - '#theme' => 'file_managed_file', - '#theme_wrappers' => array('form_element'), - '#progress_indicator' => 'throbber', - '#progress_message' => NULL, - '#upload_validators' => array(), - '#upload_location' => NULL, - '#size' => 22, - '#multiple' => FALSE, - '#extended' => FALSE, - '#attached' => array( - 'library' => array('file/drupal.file'), - ), - ); - return $types; -} - -/** * Loads file entities from the database. * * @param array $fids diff --git a/core/modules/file/src/Element/ManagedFile.php b/core/modules/file/src/Element/ManagedFile.php index 8a0891b..7a9e05f 100644 --- a/core/modules/file/src/Element/ManagedFile.php +++ b/core/modules/file/src/Element/ManagedFile.php @@ -14,8 +14,7 @@ /** * Provides an AJAX/progress aware widget for uploading and saving a file. * - * @todo Annotate once https://www.drupal.org/node/2326409 is in. - * FormElement("managed_file") + * @FormElement("managed_file") */ class ManagedFile extends FormElement {