Skip to content
Permalink
Browse files

Rename UrlHelper methods.

  • Loading branch information...
ADmad committed Mar 5, 2016
1 parent 44a014a commit 1704ab4ed235870eaba5581b43993416742e4222
Showing with 6 additions and 7 deletions.
  1. +3 −3 src/View/Helper/HtmlHelper.php
  2. +3 −4 src/View/Helper/UrlHelper.php
@@ -437,7 +437,7 @@ public function css($path, array $options = [])
if (strpos($path, '//') !== false) {
$url = $path;
} else {
$url = $this->Url->cssUrl($path, $options);
$url = $this->Url->css($path, $options);
$options = array_diff_key($options, ['fullBase' => null, 'pathPrefix' => null]);
}
@@ -528,7 +528,7 @@ public function script($url, array $options = [])
}
if (strpos($url, '//') === false) {
$url = $this->Url->scriptUrl($url, $options);
$url = $this->Url->script($url, $options);
$options = array_diff_key($options, ['fullBase' => null, 'pathPrefix' => null]);
}
if ($options['once'] && isset($this->_includedAssets[__METHOD__][$url])) {
@@ -808,7 +808,7 @@ protected function _prepareCrumbs($startText, $escape = true)
*/
public function image($path, array $options = [])
{
$path = $this->Url->imageUrl($path, $options);
$path = $this->Url->image($path, $options);
$options = array_diff_key($options, ['fullBase' => null, 'pathPrefix' => null]);
if (!isset($options['alt'])) {
@@ -50,11 +50,10 @@ public function build($url = null, $full = false)
* @param array $options Options array. Possible keys:
* `fullBase` Return full URL with domain name
* `pathPrefix` Path prefix for relative URLs
* `ext` Asset extension to append
* `plugin` False value will prevent parsing path as a plugin
* @return string Generated URL
*/
public function imageUrl($path, array $options = [])
public function image($path, array $options = [])
{
$pathPrefix = Configure::read('App.imageBaseUrl');
return $this->assetUrl($path, $options + compact('pathPrefix'));
@@ -74,7 +73,7 @@ public function imageUrl($path, array $options = [])
* `plugin` False value will prevent parsing path as a plugin
* @return string Generated URL
*/
public function cssUrl($path, array $options = [])
public function css($path, array $options = [])
{
$pathPrefix = Configure::read('App.cssBaseUrl');
$ext = '.css';
@@ -95,7 +94,7 @@ public function cssUrl($path, array $options = [])
* `plugin` False value will prevent parsing path as a plugin
* @return string Generated URL
*/
public function scriptUrl($path, array $options = [])
public function script($path, array $options = [])
{
$pathPrefix = Configure::read('App.jsBaseUrl');
$ext = '.js';

0 comments on commit 1704ab4

Please sign in to comment.
You can’t perform that action at this time.