Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
libraries
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
libraries
Commits
2bb38297
Commit
2bb38297
authored
9 years ago
by
Tobias Zimmermann
Browse files
Options
Downloads
Patches
Plain Diff
by tstoeckler: Add deprecation notices to all legacy functions and hooks
parent
ddf78f31
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries.api.php
+6
-0
6 additions, 0 deletions
libraries.api.php
libraries.module
+26
-0
26 additions, 0 deletions
libraries.module
with
32 additions
and
0 deletions
libraries.api.php
+
6
−
0
View file @
2bb38297
...
...
@@ -172,6 +172,8 @@
* Additional top-level properties can be registered as needed.
*
* @see hook_library()
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
hook_libraries_info
()
{
// The following is a full explanation of all properties. See below for more
...
...
@@ -411,6 +413,8 @@ function hook_libraries_info() {
* integration files inside of an array, whose key is the module name.
*
* @see hook_libraries_info()
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
hook_libraries_info_alter
(
&
$libraries
)
{
$files
=
array
(
...
...
@@ -435,6 +439,8 @@ function hook_libraries_info_alter(&$libraries) {
*
* @return
* An array of paths.
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
hook_libraries_info_file_paths
()
{
// Taken from the Libraries test module, which needs to specify the path to
...
...
This diff is collapsed.
Click to expand it.
libraries.module
+
26
−
0
View file @
2bb38297
...
...
@@ -38,6 +38,8 @@ function libraries_library_info_build() {
* The path to the specified library or FALSE if the library wasn't found.
*
* @ingroup libraries
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_get_path
(
$name
,
$base_path
=
FALSE
)
{
$libraries
=
&
drupal_static
(
__FUNCTION__
);
...
...
@@ -72,6 +74,8 @@ function libraries_get_path($name, $base_path = FALSE) {
* A list of library directories.
*
* @ingroup libraries
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_get_libraries
()
{
$searchdir
=
array
();
...
...
@@ -128,6 +132,8 @@ function libraries_get_libraries() {
* @return
* An array of info files, keyed by library name. The values are the paths of
* the files.
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_scan_info_files
()
{
$profile
=
drupal_get_path
(
'profile'
,
drupal_get_profile
());
...
...
@@ -167,6 +173,8 @@ function libraries_scan_info_files() {
* either 'info', 'pre-detect', 'post-detect', or 'load'.
* @param $library
* An array of library information, passed by reference.
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_invoke
(
$group
,
&
$library
)
{
foreach
(
$library
[
'callbacks'
][
$group
]
as
$callback
)
{
...
...
@@ -186,6 +194,8 @@ function libraries_invoke($group, &$library) {
* An array of library information, passed by reference.
* @param $callback
* A string containing the callback to apply to all parts of a library.
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_traverse_library
(
&
$library
,
$callback
)
{
// Always apply the callback to the top-level library.
...
...
@@ -240,6 +250,8 @@ function libraries_traverse_library(&$library, $callback) {
*
* @see libraries_info()
* @see libraries_invoke()
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_prepare_files
(
&
$library
,
$version
=
NULL
,
$variant
=
NULL
)
{
// Both the 'files' property and the 'integration files' property contain file
...
...
@@ -288,6 +300,8 @@ function libraries_prepare_files(&$library, $version = NULL, $variant = NULL) {
*
* @see libraries_info()
* @see libraries_invoke()
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_detect_dependencies
(
&
$library
,
$version
=
NULL
,
$variant
=
NULL
)
{
if
(
isset
(
$library
[
'dependencies'
]))
{
...
...
@@ -337,6 +351,8 @@ function libraries_detect_dependencies(&$library, $version = NULL, $variant = NU
*
* @todo Re-introduce support for include file plugin system - either by copying
* Wysiwyg's code, or directly switching to CTools.
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
&
libraries_info
(
$name
=
NULL
)
{
// This static cache is re-used by libraries_detect() to save memory.
...
...
@@ -423,6 +439,8 @@ function &libraries_info($name = NULL) {
* An array of library information, passed by reference.
* @name
* The machine name of the passed-in library.
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_info_defaults
(
&
$library
,
$name
)
{
$library
+=
array
(
...
...
@@ -477,6 +495,8 @@ function libraries_info_defaults(&$library, $name) {
* error message.
*
* @see libraries_info()
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_detect
(
$name
)
{
// Re-use the statically cached value of libraries_info() to save memory.
...
...
@@ -607,6 +627,8 @@ function libraries_detect($name) {
* - loaded: Either the amount of library files that have been loaded, or
* FALSE if the library could not be loaded.
* See hook_libraries_info() for more information.
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_load
(
$name
,
$variant
=
NULL
)
{
$loaded
=
&
drupal_static
(
__FUNCTION__
,
array
());
...
...
@@ -666,6 +688,8 @@ function libraries_load($name, $variant = NULL) {
*
* @return
* The number of loaded files.
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_load_files
(
$library
)
{
...
...
@@ -761,6 +785,8 @@ function libraries_load_files($library) {
* A string containing the version of the library.
*
* @see libraries_get_path()
*
* @deprecated Will be removed before a stable Drupal 8 release.
*/
function
libraries_get_version
(
$library
,
$options
)
{
// Provide defaults.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment