Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
I
image_url_formatter
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
0
Merge Requests
0
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
image_url_formatter
Commits
677137d9
Commit
677137d9
authored
Apr 19, 2012
by
g089h515r806
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding standard pss coder
parent
20b34dc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
image_url_formatter.module
image_url_formatter.module
+7
-7
No files found.
image_url_formatter.module
View file @
677137d9
...
...
@@ -13,8 +13,8 @@ function image_url_formatter_theme() {
'image_url_formatter'
=>
array
(
'variables'
=>
array
(
'item'
=>
NULL
,
'path'
=>
NULL
,
'image_style'
=>
NULL
,
'path'
=>
NULL
,
'image_style'
=>
NULL
,
),
),
);
...
...
@@ -103,10 +103,10 @@ function image_url_formatter_field_formatter_settings_summary($field, $instance,
*/
function
image_url_formatter_field_formatter_view
(
$entity_type
,
$entity
,
$field
,
$instance
,
$langcode
,
$items
,
$display
)
{
$element
=
array
();
switch
(
$display
[
'type'
])
{
case
'image_url'
:
// Check if the formatter involves a link.
// Check if the formatter involves a link.
if
(
$display
[
'settings'
][
'image_link'
]
==
'content'
)
{
$uri
=
entity_uri
(
$entity_type
,
$entity
);
}
...
...
@@ -121,7 +121,7 @@ function image_url_formatter_field_formatter_view($entity_type, $entity, $field,
'options'
=>
array
(),
);
}
//debug($item);
//debug($item);
$element
[
$delta
]
=
array
(
'#theme'
=>
'image_url_formatter'
,
'#item'
=>
$item
,
...
...
@@ -160,9 +160,9 @@ function theme_image_url_formatter($variables) {
}
$output
=
file_create_url
(
$item
[
'uri'
]);
if
(
$variables
[
'image_style'
])
{
//debug($image);
//debug($image);
$image
[
'style_name'
]
=
$variables
[
'image_style'
];
$output
=
image_style_url
(
$image
[
'style_name'
],
$item
[
'uri'
]);
$output
=
image_style_url
(
$image
[
'style_name'
],
$item
[
'uri'
]);
}
if
(
$variables
[
'path'
])
{
$path
=
$variables
[
'path'
][
'path'
];
...
...
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