Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
a7364b37
Commit
a7364b37
authored
Aug 20, 2014
by
Alex Pott
Browse files
Issue
#2324113
by penyaskito: Move Drupal/Core/Utility/Color to Drupal/Component/Utility/Color.
parent
a704796c
Changes
4
Hide whitespace changes
Inline
Side-by-side
core/includes/form.inc
View file @
a7364b37
...
...
@@ -5,6 +5,7 @@
* Functions for form and batch generation and processing.
*/
use
Drupal\Component\Utility\Color
;
use
Drupal\Component\Utility\NestedArray
;
use
Drupal\Component\Utility\Number
;
use
Drupal\Component\Utility\SafeMarkup
;
...
...
@@ -16,7 +17,6 @@
use
Drupal\Core\Form\OptGroup
;
use
Drupal\Core\Render\Element
;
use
Drupal\Core\Template\Attribute
;
use
Drupal\Core\Utility\Color
;
use
Symfony\Component\HttpFoundation\RedirectResponse
;
/**
...
...
core/lib/Drupal/Co
re
/Utility/Color.php
→
core/lib/Drupal/Co
mponent
/Utility/Color.php
View file @
a7364b37
...
...
@@ -2,12 +2,10 @@
/**
* @file
* Definition of Drupal\Co
re
\Utility\Color.
* Definition of Drupal\Co
mponent
\Utility\Color.
*/
namespace
Drupal\Core\Utility
;
use
Drupal\Component\Utility\Unicode
;
namespace
Drupal\Component\Utility
;
/**
* Performs color conversions.
...
...
@@ -15,7 +13,7 @@
class
Color
{
/**
* Validates whether a hexadecimal color value is syntatically correct.
* Validates whether a hexadecimal color value is synta
c
tically correct.
*
* @param $hex
* The hexadecimal string to validate. May contain a leading '#'. May use
...
...
@@ -56,7 +54,7 @@ public static function hexToRgb($hex) {
// Ignore '#' prefixes.
$hex
=
ltrim
(
$hex
,
'#'
);
// Convert shorhands like '#abc' to '#aabbcc'.
// Convert shor
t
hands like '#abc' to '#aabbcc'.
if
(
strlen
(
$hex
)
==
3
)
{
$hex
=
$hex
[
0
]
.
$hex
[
0
]
.
$hex
[
1
]
.
$hex
[
1
]
.
$hex
[
2
]
.
$hex
[
2
];
}
...
...
core/modules/image/src/Plugin/ImageEffect/RotateImageEffect.php
View file @
a7364b37
...
...
@@ -7,9 +7,9 @@
namespace
Drupal\image\Plugin\ImageEffect
;
use
Drupal\Component\Utility\Color
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\Core\Image\ImageInterface
;
use
Drupal\Core\Utility\Color
;
use
Drupal\image\ConfigurableImageEffectBase
;
/**
...
...
core/tests/Drupal/Tests/Co
re
/Utility/ColorTest.php
→
core/tests/Drupal/Tests/Co
mponent
/Utility/ColorTest.php
View file @
a7364b37
...
...
@@ -2,12 +2,12 @@
/**
* @file
* Contains \Drupal\Tests\Co
re
\Utility\ColorTest.
* Contains \Drupal\Tests\Co
mponent
\Utility\ColorTest.
*/
namespace
Drupal\Tests\Co
re
\Utility
;
namespace
Drupal\Tests\Co
mponent
\Utility
;
use
Drupal\Co
re
\Utility\Color
;
use
Drupal\Co
mponent
\Utility\Color
;
use
Drupal\Tests\UnitTestCase
;
/**
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment