Loading core/includes/bootstrap.inc +11 −11 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ /** * Role ID for anonymous users; should match what's in the "role" table. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or * \Drupal\user\RoleInterface::ANONYMOUS_ID instead. * Loading @@ -108,7 +108,7 @@ /** * Role ID for authenticated users; should match what's in the "role" table. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or * \Drupal\user\RoleInterface::AUTHENTICATED_ID instead. * Loading @@ -131,7 +131,7 @@ * @see http://php.net/manual/reserved.variables.server.php * @see http://php.net/manual/function.time.php * * @deprecated in Drupal 8.3.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. * Use \Drupal::time()->getRequestTime(); * * @see https://www.drupal.org/node/2785211 Loading @@ -150,7 +150,7 @@ * * @see config_get_config_directory() * * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Drupal core no * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Drupal core no * longer creates an active directory. * * @see https://www.drupal.org/node/2501187 Loading @@ -173,7 +173,7 @@ * @see config_get_config_directory() * @see CONFIG_SYNC_DIRECTORY * * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. The staging * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. The staging * directory was renamed to sync. * * @see https://www.drupal.org/node/2574957 Loading Loading @@ -395,7 +395,7 @@ function format_string($string, array $args) { * * @see \Drupal\Component\Utility\Unicode::validateUtf8() * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Component\Utility\Unicode::validateUtf8(). * * @see https://www.drupal.org/node/1992584 Loading Loading @@ -496,7 +496,7 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia * @see status-messages.html.twig * @see https://www.drupal.org/node/2774931 * * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead. */ function drupal_set_message($message = NULL, $type = 'status', $repeat = FALSE) { Loading Loading @@ -534,7 +534,7 @@ function drupal_set_message($message = NULL, $type = 'status', $repeat = FALSE) * @see status-messages.html.twig * @see https://www.drupal.org/node/2774931 * * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Messenger\MessengerInterface::all() or * \Drupal\Core\Messenger\MessengerInterface::messagesByType() instead. */ Loading Loading @@ -566,7 +566,7 @@ function drupal_get_messages($type = NULL, $clear_queue = TRUE) { * @return string * The name of the current user's timezone or the name of the default timezone. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * date_default_timezone_get() instead. * * @see https://www.drupal.org/node/3009387 Loading Loading @@ -820,7 +820,7 @@ function drupal_get_profile() { * @param string $path * The relative path to the Drupal component in the filesystem. * * @deprecated in Drupal 8.8.0, will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the * class loader as injected service instance to register the namespace: * @code * $this->classLoader->addPsr4('Drupal\\' . $name . '\\', \Drupal::root() . '/' . $path . '/src'); Loading Loading @@ -998,7 +998,7 @@ function drupal_static_reset($name = NULL) { /** * Formats text for emphasized display in a placeholder inside a sentence. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * \Drupal\Component\Render\FormattableMarkup or Twig's "placeholder" filter * instead. Note this method should not be used to simply emphasize a string * and therefore has few valid use-cases. Note also, that this method does not Loading core/includes/common.inc +20 −20 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ /** * The delimiter used to split plural strings. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use Drupal\Component\Gettext\PoItem::DELIMITER instead. */ const LOCALE_PLURAL_DELIMITER = PoItem::DELIMITER; Loading @@ -149,7 +149,7 @@ * * @ingroup form_api * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use the redirect.destination service. * * @see \Drupal\Core\EventSubscriber\RedirectResponseSubscriber::checkRedirectUrl() Loading @@ -174,7 +174,7 @@ function drupal_get_destination() { * @return bool * TRUE if the address is in a valid format. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal::service('email.validator')->isValid(). * * @see https://www.drupal.org/node/2912661 Loading Loading @@ -211,7 +211,7 @@ function valid_email_address($mail) { * Drupal\Core\Template\Attribute, call * \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() instead. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use UrlHelper::stripDangerousProtocols() or UrlHelper::filterBadProtocol() * instead. UrlHelper::stripDangerousProtocols() can be used in conjunction * with \Drupal\Component\Render\FormattableMarkup and an @variable Loading Loading @@ -323,7 +323,7 @@ function format_size($size, $langcode = NULL) { * @return * A translated date string in the requested format. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal::service('date.formatter')->format(). * * @see \Drupal\Core\Datetime\DateFormatter::format() Loading @@ -343,7 +343,7 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL * @return string * An ISO8601 formatted date. * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use * date('c', $date) instead. * * @see https://www.drupal.org/node/2999991 Loading @@ -369,7 +369,7 @@ function date_iso8601($date) { * A ; separated string ready for insertion in a HTTP header. No escaping is * performed for HTML entities, so this string is not safe to be printed. * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Render\HtmlResponseAttachmentsProcessor::formatHttpHeaderAttributes() * instead. * Loading Loading @@ -408,7 +408,7 @@ function drupal_http_header_attributes(array $attributes = []) { * * @ingroup php_wrappers * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use * \Drupal\Component\Utility\Environment::setTimeLimit() instead. * * @see https://www.drupal.org/node/3000058 Loading @@ -435,7 +435,7 @@ function base_path() { /** * Deletes old cached CSS files. * * @deprecated in Drupal 8.x, will be removed before Drupal 9.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Asset\AssetCollectionOptimizerInterface::deleteAll(). * * @see https://www.drupal.org/node/2317841 Loading Loading @@ -753,7 +753,7 @@ function drupal_attach_tabledrag(&$element, array $options) { /** * Deletes old cached JavaScript files and variables. * * @deprecated in Drupal 8.x, will be removed before Drupal 9.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Asset\AssetCollectionOptimizerInterface::deleteAll(). * * @see https://www.drupal.org/node/2317841 Loading @@ -765,7 +765,7 @@ function drupal_clear_js_cache() { /** * Pre-render callback: Renders a link into #markup. * * @deprecated in Drupal 8.x, will be removed before Drupal 9.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Render\Element\Link::preRenderLink(). */ function drupal_pre_render_link($element) { Loading @@ -775,7 +775,7 @@ function drupal_pre_render_link($element) { /** * Pre-render callback: Collects child links into a single array. * * @deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Render\Element\Link::preRenderLinks() instead. * * @see https://www.drupal.org/node/2966725 Loading @@ -788,7 +788,7 @@ function drupal_pre_render_links($element) { /** * Renders final HTML given a structured array tree. * * @deprecated as of drupal:8.0.0 and is removed from drupal:9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Render\RendererInterface::renderRoot() instead. * * @see \Drupal\Core\Render\RendererInterface::renderRoot() Loading @@ -802,7 +802,7 @@ function drupal_render_root(&$elements) { /** * Renders HTML given a structured array tree. * * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * 'renderer' service instead. * * @see \Drupal\Core\Render\RendererInterface::render() Loading @@ -825,7 +825,7 @@ function drupal_render(&$elements, $is_recursive_call = FALSE) { * @return string|\Drupal\Component\Render\MarkupInterface * The rendered HTML of all children of the element. * * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Avoid early * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Avoid early * rendering when possible or loop through the elements and render them as * they are available. * Loading Loading @@ -942,7 +942,7 @@ function show(&$element) { * @param $type * An element type as defined by an element plugin. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal::service('element_info')->getInfo() instead. * * @see https://www.drupal.org/node/2235461 Loading @@ -962,7 +962,7 @@ function element_info($type) { * (Optional) The value to return if the element type does not specify a * value for the property. Defaults to NULL. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal::service('element_info')->getInfoProperty() instead. * * @see https://www.drupal.org/node/2235461 Loading Loading @@ -1143,7 +1143,7 @@ function debug($data, $label = NULL, $print_r = TRUE) { * NULL if compatible, otherwise the original dependency version string that * caused the incompatibility. * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Extension\Dependency::isCompatible() instead. * * @see https://www.drupal.org/node/2756875 Loading @@ -1166,7 +1166,7 @@ function drupal_check_incompatibility($v, $current_version) { * A space-separated string of extensions suitable for use by the file * validation system. * * @deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Archiver\ArchiverManager::getExtensions() instead. * * @see https://www.drupal.org/node/2999951 Loading @@ -1191,7 +1191,7 @@ function archiver_get_extensions() { * @throws \Exception * If a remote stream wrapper path was passed. * * @deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead, * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, * get plugin.manager.archiver service from container and call getInstance() * method on it. For example $archiver->getInstance(['filepath' => $file]); * Loading core/includes/database.inc +42 −42 File changed.Preview size limit exceeded, changes collapsed. Show changes core/includes/entity.inc +15 −15 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ /** * Clears the entity render cache for all entity types. * * @deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Instead, * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Instead, * use \Drupal\Core\Entity\EntityViewBuilderInterface::resetCache() on the * required entity types or invalidate specific cache tags. * Loading Loading @@ -38,7 +38,7 @@ function entity_render_cache_clear() { * @return array * The bundle info for a specific entity type, or all entity types. * * @deprecated in Drupal 8.x-dev and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo() for a * single bundle, or * \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getAllBundleInfo() for Loading Loading @@ -71,7 +71,7 @@ function entity_get_bundles($entity_type = NULL) { * @return \Drupal\Core\Entity\EntityInterface|null * The entity object, or NULL if there is no entity with the given ID. * * @deprecated in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's load() method. * * @see https://www.drupal.org/node/2266845 Loading @@ -97,7 +97,7 @@ function entity_load($entity_type, $id, $reset = FALSE) { * The entity object, or NULL if there is no entity with the given revision * id. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's loadRevision() method. * * @see https://www.drupal.org/node/1818376 Loading @@ -117,7 +117,7 @@ function entity_revision_load($entity_type, $revision_id) { * @param $revision_id * The revision ID to delete. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's deleteRevision() method. * * @see https://www.drupal.org/node/1818376 Loading Loading @@ -157,7 +157,7 @@ function entity_revision_delete($entity_type, $revision_id) { * @return array * An array of entity objects indexed by their IDs. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's loadMultiple() method. * * @see https://www.drupal.org/node/2266845 Loading @@ -184,7 +184,7 @@ function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) { * An array of entity objects indexed by their IDs. Returns an empty array if * no matching entities are found. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's loadByProperties() method. * * @see https://www.drupal.org/node/3050910 Loading Loading @@ -212,7 +212,7 @@ function entity_load_multiple_by_properties($entity_type, array $values) { * @return \Drupal\Core\Entity\EntityInterface|null * The unchanged entity, or FALSE if the entity cannot be loaded. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's loadUnchanged() method. * * @see https://www.drupal.org/node/1935744 Loading @@ -232,7 +232,7 @@ function entity_load_unchanged($entity_type, $id) { * @param array $ids * An array of entity IDs of the entities to delete. * * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * the entity storage's delete() method to delete multiple entities: * @code * $storage_handler = \Drupal::entityTypeManager()->getStorage($entity_type); Loading Loading @@ -264,7 +264,7 @@ function entity_delete_multiple($entity_type, array $ids) { * @return \Drupal\Core\Entity\EntityInterface * A new entity object. * * @deprecated in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * The method overriding Entity::create() for the entity type, e.g. * \Drupal\node\Entity\Node::create() if the entity type is known. If the * entity type is variable, use the entity storage's create() method to Loading Loading @@ -297,7 +297,7 @@ function entity_create($entity_type, array $values = []) { * @return string|null * The label of the entity, or NULL if there is no label defined. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity's label() method. * * @see https://www.drupal.org/node/2549923 Loading Loading @@ -325,7 +325,7 @@ function entity_page_label(EntityInterface $entity, $langcode = NULL) { * @return array * A render array for the entity. * * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use the entity view builder's view() method for creating a render array: * @code * $view_builder = \Drupal::entityTypeManager() Loading Loading @@ -364,7 +364,7 @@ function entity_view(EntityInterface $entity, $view_mode, $langcode = NULL, $res * A render array for the entities, indexed by the same keys as the * entities array passed in $entities. * * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use the entity view builder's viewMultiple() method for creating a render * array for the provided entities: * @code Loading Loading @@ -425,7 +425,7 @@ function entity_view_multiple(array $entities, $view_mode, $langcode = NULL, $re * @return \Drupal\Core\Entity\Display\EntityViewDisplayInterface * The entity view display associated with the view mode. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * EntityDisplayRepositoryInterface::getViewDisplay() instead. * * @see https://www.drupal.org/node/2835616 Loading Loading @@ -471,7 +471,7 @@ function entity_get_display($entity_type, $bundle, $view_mode) { * @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface * The entity form display associated with the given form mode. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * EntityDisplayRepositoryInterface::getFormDisplay() instead. * * @see https://www.drupal.org/node/2835616 Loading core/includes/file.inc +36 −36 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ /** * Default mode for new directories. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::CHMOD_DIRECTORY. * * @see \Drupal\Core\File\FileSystemInterface::chmod() Loading @@ -29,7 +29,7 @@ /** * Default mode for new files. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::CHMOD_FILE. * * @see \Drupal\Core\File\FileSystemInterface::chmod() Loading @@ -46,7 +46,7 @@ /** * Flag used to create a directory if not present. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY. */ const FILE_CREATE_DIRECTORY = FileSystemInterface::CREATE_DIRECTORY; Loading @@ -54,7 +54,7 @@ /** * Flag used to indicate file permissions may be changed. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::MODIFY_PERMISSIONS. */ const FILE_MODIFY_PERMISSIONS = FileSystemInterface::MODIFY_PERMISSIONS; Loading @@ -62,7 +62,7 @@ /** * Flag for dealing with existing files: Appends number until name is unique. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::EXISTS_RENAME. */ const FILE_EXISTS_RENAME = FileSystemInterface::EXISTS_RENAME; Loading @@ -70,7 +70,7 @@ /** * Flag for dealing with existing files: Replace the existing file. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE. */ const FILE_EXISTS_REPLACE = FileSystemInterface::EXISTS_REPLACE; Loading @@ -78,7 +78,7 @@ /** * Flag for dealing with existing files: Do nothing and return FALSE. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::EXISTS_ERROR. */ const FILE_EXISTS_ERROR = FileSystemInterface::EXISTS_ERROR; Loading @@ -96,7 +96,7 @@ /** * Returns the scheme of a URI (e.g. a stream). * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme() * instead. * Loading @@ -110,7 +110,7 @@ function file_uri_scheme($uri) { /** * Checks that the scheme of a stream URI is valid. * * @deprecated in drupal:8.8.0 and will be removed from Drupal 9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme() * instead. * Loading @@ -132,7 +132,7 @@ function file_stream_wrapper_valid_scheme($scheme) { * For example, the URI "public://sample/test.txt" would return * "sample/test.txt". * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget() * instead. * Loading @@ -149,7 +149,7 @@ function file_uri_target($uri) { * @return string * 'public', 'private' or any other file scheme defined as the default. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal::config('system.file')->get('default_scheme') instead. * * @see https://www.drupal.org/node/3049030 Loading @@ -174,7 +174,7 @@ function file_default_scheme() { * @return string * The normalized URI. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::normalizeUri() * instead. * Loading Loading @@ -314,7 +314,7 @@ function file_url_transform_relative($file_url) { * TRUE if the directory exists (or was created) and is writable. FALSE * otherwise. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::prepareDirectory(). */ function file_prepare_directory(&$directory, $options = FileSystemInterface::MODIFY_PERMISSIONS) { Loading Loading @@ -371,7 +371,7 @@ function file_save_htaccess($directory, $private = TRUE, $force_overwrite = FALS * @return string * The desired contents of the .htaccess file. * * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Component\FileSecurity\FileSecurity::htaccessLines(). * * @see https://www.drupal.org/node/2418133 Loading @@ -393,7 +393,7 @@ function file_htaccess_lines($private = TRUE) { * @return * TRUE if the URI is allowed. * * @deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidUri() * instead. * Loading Loading @@ -435,7 +435,7 @@ function file_valid_uri($uri) { * @return * The path to the new file, or FALSE in the event of an error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::copy(). * * @see file_copy() Loading Loading @@ -484,7 +484,7 @@ function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXIST * @return * TRUE, or FALSE in the event of an error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::getDestinationFilename() instead. * * @see file_unmanaged_copy() Loading Loading @@ -580,7 +580,7 @@ function file_build_uri($path) { * The destination filepath, or FALSE if the file already exists * and FILE_EXISTS_ERROR is specified. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::getDestinationFilename(). * * @see https://www.drupal.org/node/3006851 Loading Loading @@ -621,7 +621,7 @@ function file_destination($destination, $replace) { * @return * The path to the new file, or FALSE in the event of an error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::move(). * * @see file_move() Loading Loading @@ -740,7 +740,7 @@ function file_unmunge_filename($filename) { * File path consisting of $directory and a unique filename based off * of $basename. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::createFilename(). * * @see https://www.drupal.org/node/3006851 Loading @@ -760,7 +760,7 @@ function file_create_filename($basename, $directory) { * @param $fid * The file id. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead. * * @see file_unmanaged_delete() Loading @@ -783,7 +783,7 @@ function file_delete($fid) { * @param $fids * An array of file ids. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead. * * @see file_unmanaged_delete() Loading Loading @@ -811,7 +811,7 @@ function file_delete_multiple(array $fids) { * TRUE for success or path does not exist, or FALSE in the event of an * error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::delete(). * * @see file_delete() Loading Loading @@ -851,7 +851,7 @@ function file_unmanaged_delete($path) { * TRUE for success or if path does not exist, FALSE in the event of an * error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::deleteRecursive(). * * @see file_unmanaged_delete() Loading @@ -871,7 +871,7 @@ function file_unmanaged_delete_recursive($path, $callback = NULL) { /** * Moves an uploaded file to a new location. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::moveUploadedFile(). * * @see https://www.drupal.org/node/2418133 Loading Loading @@ -905,7 +905,7 @@ function drupal_move_uploaded_file($filename, $uri) { * @return * A string with the path of the resulting file, or FALSE on error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::saveData(). * * @see file_save_data() Loading Loading @@ -992,7 +992,7 @@ function file_scan_directory($dir, $mask, $options = [], $depth = 0) { * A file size limit in bytes based on the PHP upload_max_filesize and * post_max_size * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Component\Utility\Environment::getUploadMaxSize() instead. */ function file_upload_max_size() { Loading @@ -1003,7 +1003,7 @@ function file_upload_max_size() { /** * Sets the permissions on a file or directory. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::chmod(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1016,7 +1016,7 @@ function drupal_chmod($uri, $mode = NULL) { /** * Deletes a file. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::unlink(). * * @see \Drupal\Core\File\FileSystem::unlink() Loading @@ -1030,7 +1030,7 @@ function drupal_unlink($uri, $context = NULL) { /** * Resolves the absolute filepath of a local URI or filepath. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::realpath(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1043,7 +1043,7 @@ function drupal_realpath($uri) { /** * Gets the name of the directory from a given path. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::dirname(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1056,7 +1056,7 @@ function drupal_dirname($uri) { /** * Gets the filename from a given path. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::basename(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1070,7 +1070,7 @@ function drupal_basename($uri, $suffix = NULL) { * Creates a directory, optionally creating missing components in the path to * the directory. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::mkdir(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1083,7 +1083,7 @@ function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) { /** * Removes a directory. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::rmdir(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1096,7 +1096,7 @@ function drupal_rmdir($uri, $context = NULL) { /** * Creates a file with a unique filename in the specified directory. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::tempnam(). * * @see https://www.drupal.org/node/2418133 Loading Loading @@ -1129,7 +1129,7 @@ function file_directory_temp() { * @return mixed * A string containing the path to the temporary directory. * * @deprecated in Drupal 8.3.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. * Use \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory(). * * @see https://www.drupal.org/node/2418133 Loading Loading
core/includes/bootstrap.inc +11 −11 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ /** * Role ID for anonymous users; should match what's in the "role" table. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use Drupal\Core\Session\AccountInterface::ANONYMOUS_ROLE or * \Drupal\user\RoleInterface::ANONYMOUS_ID instead. * Loading @@ -108,7 +108,7 @@ /** * Role ID for authenticated users; should match what's in the "role" table. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use Drupal\Core\Session\AccountInterface::AUTHENTICATED_ROLE or * \Drupal\user\RoleInterface::AUTHENTICATED_ID instead. * Loading @@ -131,7 +131,7 @@ * @see http://php.net/manual/reserved.variables.server.php * @see http://php.net/manual/function.time.php * * @deprecated in Drupal 8.3.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. * Use \Drupal::time()->getRequestTime(); * * @see https://www.drupal.org/node/2785211 Loading @@ -150,7 +150,7 @@ * * @see config_get_config_directory() * * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Drupal core no * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Drupal core no * longer creates an active directory. * * @see https://www.drupal.org/node/2501187 Loading @@ -173,7 +173,7 @@ * @see config_get_config_directory() * @see CONFIG_SYNC_DIRECTORY * * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. The staging * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. The staging * directory was renamed to sync. * * @see https://www.drupal.org/node/2574957 Loading Loading @@ -395,7 +395,7 @@ function format_string($string, array $args) { * * @see \Drupal\Component\Utility\Unicode::validateUtf8() * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Component\Utility\Unicode::validateUtf8(). * * @see https://www.drupal.org/node/1992584 Loading Loading @@ -496,7 +496,7 @@ function watchdog_exception($type, Exception $exception, $message = NULL, $varia * @see status-messages.html.twig * @see https://www.drupal.org/node/2774931 * * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead. */ function drupal_set_message($message = NULL, $type = 'status', $repeat = FALSE) { Loading Loading @@ -534,7 +534,7 @@ function drupal_set_message($message = NULL, $type = 'status', $repeat = FALSE) * @see status-messages.html.twig * @see https://www.drupal.org/node/2774931 * * @deprecated in Drupal 8.5.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.5.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Messenger\MessengerInterface::all() or * \Drupal\Core\Messenger\MessengerInterface::messagesByType() instead. */ Loading Loading @@ -566,7 +566,7 @@ function drupal_get_messages($type = NULL, $clear_queue = TRUE) { * @return string * The name of the current user's timezone or the name of the default timezone. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * date_default_timezone_get() instead. * * @see https://www.drupal.org/node/3009387 Loading Loading @@ -820,7 +820,7 @@ function drupal_get_profile() { * @param string $path * The relative path to the Drupal component in the filesystem. * * @deprecated in Drupal 8.8.0, will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use the * class loader as injected service instance to register the namespace: * @code * $this->classLoader->addPsr4('Drupal\\' . $name . '\\', \Drupal::root() . '/' . $path . '/src'); Loading Loading @@ -998,7 +998,7 @@ function drupal_static_reset($name = NULL) { /** * Formats text for emphasized display in a placeholder inside a sentence. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * \Drupal\Component\Render\FormattableMarkup or Twig's "placeholder" filter * instead. Note this method should not be used to simply emphasize a string * and therefore has few valid use-cases. Note also, that this method does not Loading
core/includes/common.inc +20 −20 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ /** * The delimiter used to split plural strings. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use Drupal\Component\Gettext\PoItem::DELIMITER instead. */ const LOCALE_PLURAL_DELIMITER = PoItem::DELIMITER; Loading @@ -149,7 +149,7 @@ * * @ingroup form_api * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use the redirect.destination service. * * @see \Drupal\Core\EventSubscriber\RedirectResponseSubscriber::checkRedirectUrl() Loading @@ -174,7 +174,7 @@ function drupal_get_destination() { * @return bool * TRUE if the address is in a valid format. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal::service('email.validator')->isValid(). * * @see https://www.drupal.org/node/2912661 Loading Loading @@ -211,7 +211,7 @@ function valid_email_address($mail) { * Drupal\Core\Template\Attribute, call * \Drupal\Component\Utility\UrlHelper::stripDangerousProtocols() instead. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use UrlHelper::stripDangerousProtocols() or UrlHelper::filterBadProtocol() * instead. UrlHelper::stripDangerousProtocols() can be used in conjunction * with \Drupal\Component\Render\FormattableMarkup and an @variable Loading Loading @@ -323,7 +323,7 @@ function format_size($size, $langcode = NULL) { * @return * A translated date string in the requested format. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal::service('date.formatter')->format(). * * @see \Drupal\Core\Datetime\DateFormatter::format() Loading @@ -343,7 +343,7 @@ function format_date($timestamp, $type = 'medium', $format = '', $timezone = NUL * @return string * An ISO8601 formatted date. * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use * date('c', $date) instead. * * @see https://www.drupal.org/node/2999991 Loading @@ -369,7 +369,7 @@ function date_iso8601($date) { * A ; separated string ready for insertion in a HTTP header. No escaping is * performed for HTML entities, so this string is not safe to be printed. * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Render\HtmlResponseAttachmentsProcessor::formatHttpHeaderAttributes() * instead. * Loading Loading @@ -408,7 +408,7 @@ function drupal_http_header_attributes(array $attributes = []) { * * @ingroup php_wrappers * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use * \Drupal\Component\Utility\Environment::setTimeLimit() instead. * * @see https://www.drupal.org/node/3000058 Loading @@ -435,7 +435,7 @@ function base_path() { /** * Deletes old cached CSS files. * * @deprecated in Drupal 8.x, will be removed before Drupal 9.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Asset\AssetCollectionOptimizerInterface::deleteAll(). * * @see https://www.drupal.org/node/2317841 Loading Loading @@ -753,7 +753,7 @@ function drupal_attach_tabledrag(&$element, array $options) { /** * Deletes old cached JavaScript files and variables. * * @deprecated in Drupal 8.x, will be removed before Drupal 9.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Asset\AssetCollectionOptimizerInterface::deleteAll(). * * @see https://www.drupal.org/node/2317841 Loading @@ -765,7 +765,7 @@ function drupal_clear_js_cache() { /** * Pre-render callback: Renders a link into #markup. * * @deprecated in Drupal 8.x, will be removed before Drupal 9.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Render\Element\Link::preRenderLink(). */ function drupal_pre_render_link($element) { Loading @@ -775,7 +775,7 @@ function drupal_pre_render_link($element) { /** * Pre-render callback: Collects child links into a single array. * * @deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Render\Element\Link::preRenderLinks() instead. * * @see https://www.drupal.org/node/2966725 Loading @@ -788,7 +788,7 @@ function drupal_pre_render_links($element) { /** * Renders final HTML given a structured array tree. * * @deprecated as of drupal:8.0.0 and is removed from drupal:9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Render\RendererInterface::renderRoot() instead. * * @see \Drupal\Core\Render\RendererInterface::renderRoot() Loading @@ -802,7 +802,7 @@ function drupal_render_root(&$elements) { /** * Renders HTML given a structured array tree. * * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * 'renderer' service instead. * * @see \Drupal\Core\Render\RendererInterface::render() Loading @@ -825,7 +825,7 @@ function drupal_render(&$elements, $is_recursive_call = FALSE) { * @return string|\Drupal\Component\Render\MarkupInterface * The rendered HTML of all children of the element. * * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Avoid early * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Avoid early * rendering when possible or loop through the elements and render them as * they are available. * Loading Loading @@ -942,7 +942,7 @@ function show(&$element) { * @param $type * An element type as defined by an element plugin. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal::service('element_info')->getInfo() instead. * * @see https://www.drupal.org/node/2235461 Loading @@ -962,7 +962,7 @@ function element_info($type) { * (Optional) The value to return if the element type does not specify a * value for the property. Defaults to NULL. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal::service('element_info')->getInfoProperty() instead. * * @see https://www.drupal.org/node/2235461 Loading Loading @@ -1143,7 +1143,7 @@ function debug($data, $label = NULL, $print_r = TRUE) { * NULL if compatible, otherwise the original dependency version string that * caused the incompatibility. * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Extension\Dependency::isCompatible() instead. * * @see https://www.drupal.org/node/2756875 Loading @@ -1166,7 +1166,7 @@ function drupal_check_incompatibility($v, $current_version) { * A space-separated string of extensions suitable for use by the file * validation system. * * @deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Archiver\ArchiverManager::getExtensions() instead. * * @see https://www.drupal.org/node/2999951 Loading @@ -1191,7 +1191,7 @@ function archiver_get_extensions() { * @throws \Exception * If a remote stream wrapper path was passed. * * @deprecated in Drupal 8.8.0 and will be removed before Drupal 9.0.0. Instead, * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Instead, * get plugin.manager.archiver service from container and call getInstance() * method on it. For example $archiver->getInstance(['filepath' => $file]); * Loading
core/includes/database.inc +42 −42 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/includes/entity.inc +15 −15 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ /** * Clears the entity render cache for all entity types. * * @deprecated in Drupal 8.7.x and will be removed before Drupal 9.0.0. Instead, * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. Instead, * use \Drupal\Core\Entity\EntityViewBuilderInterface::resetCache() on the * required entity types or invalidate specific cache tags. * Loading Loading @@ -38,7 +38,7 @@ function entity_render_cache_clear() { * @return array * The bundle info for a specific entity type, or all entity types. * * @deprecated in Drupal 8.x-dev and will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getBundleInfo() for a * single bundle, or * \Drupal\Core\Entity\EntityTypeBundleInfoInterface::getAllBundleInfo() for Loading Loading @@ -71,7 +71,7 @@ function entity_get_bundles($entity_type = NULL) { * @return \Drupal\Core\Entity\EntityInterface|null * The entity object, or NULL if there is no entity with the given ID. * * @deprecated in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's load() method. * * @see https://www.drupal.org/node/2266845 Loading @@ -97,7 +97,7 @@ function entity_load($entity_type, $id, $reset = FALSE) { * The entity object, or NULL if there is no entity with the given revision * id. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's loadRevision() method. * * @see https://www.drupal.org/node/1818376 Loading @@ -117,7 +117,7 @@ function entity_revision_load($entity_type, $revision_id) { * @param $revision_id * The revision ID to delete. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's deleteRevision() method. * * @see https://www.drupal.org/node/1818376 Loading Loading @@ -157,7 +157,7 @@ function entity_revision_delete($entity_type, $revision_id) { * @return array * An array of entity objects indexed by their IDs. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's loadMultiple() method. * * @see https://www.drupal.org/node/2266845 Loading @@ -184,7 +184,7 @@ function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) { * An array of entity objects indexed by their IDs. Returns an empty array if * no matching entities are found. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's loadByProperties() method. * * @see https://www.drupal.org/node/3050910 Loading Loading @@ -212,7 +212,7 @@ function entity_load_multiple_by_properties($entity_type, array $values) { * @return \Drupal\Core\Entity\EntityInterface|null * The unchanged entity, or FALSE if the entity cannot be loaded. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity type storage's loadUnchanged() method. * * @see https://www.drupal.org/node/1935744 Loading @@ -232,7 +232,7 @@ function entity_load_unchanged($entity_type, $id) { * @param array $ids * An array of entity IDs of the entities to delete. * * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * the entity storage's delete() method to delete multiple entities: * @code * $storage_handler = \Drupal::entityTypeManager()->getStorage($entity_type); Loading Loading @@ -264,7 +264,7 @@ function entity_delete_multiple($entity_type, array $ids) { * @return \Drupal\Core\Entity\EntityInterface * A new entity object. * * @deprecated in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use * The method overriding Entity::create() for the entity type, e.g. * \Drupal\node\Entity\Node::create() if the entity type is known. If the * entity type is variable, use the entity storage's create() method to Loading Loading @@ -297,7 +297,7 @@ function entity_create($entity_type, array $values = []) { * @return string|null * The label of the entity, or NULL if there is no label defined. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use the * entity's label() method. * * @see https://www.drupal.org/node/2549923 Loading Loading @@ -325,7 +325,7 @@ function entity_page_label(EntityInterface $entity, $langcode = NULL) { * @return array * A render array for the entity. * * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use the entity view builder's view() method for creating a render array: * @code * $view_builder = \Drupal::entityTypeManager() Loading Loading @@ -364,7 +364,7 @@ function entity_view(EntityInterface $entity, $view_mode, $langcode = NULL, $res * A render array for the entities, indexed by the same keys as the * entities array passed in $entities. * * @deprecated as of Drupal 8.0.x, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use the entity view builder's viewMultiple() method for creating a render * array for the provided entities: * @code Loading Loading @@ -425,7 +425,7 @@ function entity_view_multiple(array $entities, $view_mode, $langcode = NULL, $re * @return \Drupal\Core\Entity\Display\EntityViewDisplayInterface * The entity view display associated with the view mode. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * EntityDisplayRepositoryInterface::getViewDisplay() instead. * * @see https://www.drupal.org/node/2835616 Loading Loading @@ -471,7 +471,7 @@ function entity_get_display($entity_type, $bundle, $view_mode) { * @return \Drupal\Core\Entity\Display\EntityFormDisplayInterface * The entity form display associated with the given form mode. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * EntityDisplayRepositoryInterface::getFormDisplay() instead. * * @see https://www.drupal.org/node/2835616 Loading
core/includes/file.inc +36 −36 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ /** * Default mode for new directories. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::CHMOD_DIRECTORY. * * @see \Drupal\Core\File\FileSystemInterface::chmod() Loading @@ -29,7 +29,7 @@ /** * Default mode for new files. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::CHMOD_FILE. * * @see \Drupal\Core\File\FileSystemInterface::chmod() Loading @@ -46,7 +46,7 @@ /** * Flag used to create a directory if not present. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::CREATE_DIRECTORY. */ const FILE_CREATE_DIRECTORY = FileSystemInterface::CREATE_DIRECTORY; Loading @@ -54,7 +54,7 @@ /** * Flag used to indicate file permissions may be changed. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::MODIFY_PERMISSIONS. */ const FILE_MODIFY_PERMISSIONS = FileSystemInterface::MODIFY_PERMISSIONS; Loading @@ -62,7 +62,7 @@ /** * Flag for dealing with existing files: Appends number until name is unique. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::EXISTS_RENAME. */ const FILE_EXISTS_RENAME = FileSystemInterface::EXISTS_RENAME; Loading @@ -70,7 +70,7 @@ /** * Flag for dealing with existing files: Replace the existing file. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::EXISTS_REPLACE. */ const FILE_EXISTS_REPLACE = FileSystemInterface::EXISTS_REPLACE; Loading @@ -78,7 +78,7 @@ /** * Flag for dealing with existing files: Do nothing and return FALSE. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::EXISTS_ERROR. */ const FILE_EXISTS_ERROR = FileSystemInterface::EXISTS_ERROR; Loading @@ -96,7 +96,7 @@ /** * Returns the scheme of a URI (e.g. a stream). * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getScheme() * instead. * Loading @@ -110,7 +110,7 @@ function file_uri_scheme($uri) { /** * Checks that the scheme of a stream URI is valid. * * @deprecated in drupal:8.8.0 and will be removed from Drupal 9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme() * instead. * Loading @@ -132,7 +132,7 @@ function file_stream_wrapper_valid_scheme($scheme) { * For example, the URI "public://sample/test.txt" would return * "sample/test.txt". * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget() * instead. * Loading @@ -149,7 +149,7 @@ function file_uri_target($uri) { * @return string * 'public', 'private' or any other file scheme defined as the default. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal::config('system.file')->get('default_scheme') instead. * * @see https://www.drupal.org/node/3049030 Loading @@ -174,7 +174,7 @@ function file_default_scheme() { * @return string * The normalized URI. * * @deprecated in drupal:8.8.0 and will be removed from drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::normalizeUri() * instead. * Loading Loading @@ -314,7 +314,7 @@ function file_url_transform_relative($file_url) { * TRUE if the directory exists (or was created) and is writable. FALSE * otherwise. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::prepareDirectory(). */ function file_prepare_directory(&$directory, $options = FileSystemInterface::MODIFY_PERMISSIONS) { Loading Loading @@ -371,7 +371,7 @@ function file_save_htaccess($directory, $private = TRUE, $force_overwrite = FALS * @return string * The desired contents of the .htaccess file. * * @deprecated in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Component\FileSecurity\FileSecurity::htaccessLines(). * * @see https://www.drupal.org/node/2418133 Loading @@ -393,7 +393,7 @@ function file_htaccess_lines($private = TRUE) { * @return * TRUE if the URI is allowed. * * @deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use * @deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use * \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidUri() * instead. * Loading Loading @@ -435,7 +435,7 @@ function file_valid_uri($uri) { * @return * The path to the new file, or FALSE in the event of an error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::copy(). * * @see file_copy() Loading Loading @@ -484,7 +484,7 @@ function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXIST * @return * TRUE, or FALSE in the event of an error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::getDestinationFilename() instead. * * @see file_unmanaged_copy() Loading Loading @@ -580,7 +580,7 @@ function file_build_uri($path) { * The destination filepath, or FALSE if the file already exists * and FILE_EXISTS_ERROR is specified. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::getDestinationFilename(). * * @see https://www.drupal.org/node/3006851 Loading Loading @@ -621,7 +621,7 @@ function file_destination($destination, $replace) { * @return * The path to the new file, or FALSE in the event of an error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::move(). * * @see file_move() Loading Loading @@ -740,7 +740,7 @@ function file_unmunge_filename($filename) { * File path consisting of $directory and a unique filename based off * of $basename. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::createFilename(). * * @see https://www.drupal.org/node/3006851 Loading @@ -760,7 +760,7 @@ function file_create_filename($basename, $directory) { * @param $fid * The file id. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead. * * @see file_unmanaged_delete() Loading @@ -783,7 +783,7 @@ function file_delete($fid) { * @param $fids * An array of file ids. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\Entity\EntityStorageInterface::delete() instead. * * @see file_unmanaged_delete() Loading Loading @@ -811,7 +811,7 @@ function file_delete_multiple(array $fids) { * TRUE for success or path does not exist, or FALSE in the event of an * error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::delete(). * * @see file_delete() Loading Loading @@ -851,7 +851,7 @@ function file_unmanaged_delete($path) { * TRUE for success or if path does not exist, FALSE in the event of an * error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::deleteRecursive(). * * @see file_unmanaged_delete() Loading @@ -871,7 +871,7 @@ function file_unmanaged_delete_recursive($path, $callback = NULL) { /** * Moves an uploaded file to a new location. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::moveUploadedFile(). * * @see https://www.drupal.org/node/2418133 Loading Loading @@ -905,7 +905,7 @@ function drupal_move_uploaded_file($filename, $uri) { * @return * A string with the path of the resulting file, or FALSE on error. * * @deprecated in Drupal 8.7.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystemInterface::saveData(). * * @see file_save_data() Loading Loading @@ -992,7 +992,7 @@ function file_scan_directory($dir, $mask, $options = [], $depth = 0) { * A file size limit in bytes based on the PHP upload_max_filesize and * post_max_size * * @deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.7.0 and is removed from drupal:9.0.0. * Use \Drupal\Component\Utility\Environment::getUploadMaxSize() instead. */ function file_upload_max_size() { Loading @@ -1003,7 +1003,7 @@ function file_upload_max_size() { /** * Sets the permissions on a file or directory. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::chmod(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1016,7 +1016,7 @@ function drupal_chmod($uri, $mode = NULL) { /** * Deletes a file. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::unlink(). * * @see \Drupal\Core\File\FileSystem::unlink() Loading @@ -1030,7 +1030,7 @@ function drupal_unlink($uri, $context = NULL) { /** * Resolves the absolute filepath of a local URI or filepath. * * @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::realpath(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1043,7 +1043,7 @@ function drupal_realpath($uri) { /** * Gets the name of the directory from a given path. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::dirname(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1056,7 +1056,7 @@ function drupal_dirname($uri) { /** * Gets the filename from a given path. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::basename(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1070,7 +1070,7 @@ function drupal_basename($uri, $suffix = NULL) { * Creates a directory, optionally creating missing components in the path to * the directory. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::mkdir(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1083,7 +1083,7 @@ function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) { /** * Removes a directory. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::rmdir(). * * @see https://www.drupal.org/node/2418133 Loading @@ -1096,7 +1096,7 @@ function drupal_rmdir($uri, $context = NULL) { /** * Creates a file with a unique filename in the specified directory. * * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. * Use \Drupal\Core\File\FileSystem::tempnam(). * * @see https://www.drupal.org/node/2418133 Loading Loading @@ -1129,7 +1129,7 @@ function file_directory_temp() { * @return mixed * A string containing the path to the temporary directory. * * @deprecated in Drupal 8.3.x-dev, will be removed before Drupal 9.0.0. * @deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. * Use \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory(). * * @see https://www.drupal.org/node/2418133 Loading