Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
229
Merge Requests
229
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
02b74638
Commit
02b74638
authored
Jun 28, 2010
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#839520
by agentrickard: entity_uri() should pass the entity data to url().
parent
99484ebf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
includes/common.inc
includes/common.inc
+8
-0
No files found.
includes/common.inc
View file @
02b74638
...
...
@@ -1975,6 +1975,10 @@ function format_username($account) {
* Drupal on a web server that cannot be configured to automatically find
* index.php, then hook_url_outbound_alter() can be implemented to force
* this value to 'index.php'.
* - 'entity_type': The entity type of the object that called url(). Only set if
* url() is invoked by entity_uri().
* - 'entity': The entity object (such as a node) for which the URL is being
* generated. Only set if url() is invoked by entity_uri().
*
* @return
* A string containing a URL to the given path.
...
...
@@ -6629,6 +6633,10 @@ function entity_uri($entity_type, $entity) {
if
(
!
isset
(
$entity
->
uri
[
'options'
]))
{
$entity
->
uri
[
'options'
]
=
array
();
}
// Pass the entity data to url() so that alter functions do not need to
// lookup this entity again.
$entity
->
uri
[
'options'
][
'entity_type'
]
=
$entity_type
;
$entity
->
uri
[
'options'
][
'entity'
]
=
$entity
;
}
else
{
$entity
->
uri
=
FALSE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment