Use relative URL for assets as default

This commit is contained in:
Dmitriy Simushev 2014-10-10 10:17:41 +00:00
parent 922edc96d7
commit 46ee9df63a
2 changed files with 3 additions and 3 deletions

View File

@ -248,7 +248,7 @@ class AssetManager implements AssetManagerInterface
if (is_string($asset)) {
$normalized_assets[] = array(
'content' => $asset,
'type' => AssetManagerInterface::ABSOLUTE_URL,
'type' => AssetManagerInterface::RELATIVE_URL,
);
} elseif (is_array($asset) && !empty($asset['type']) && !empty($asset['content'])) {
$normalized_assets[] = $asset;

View File

@ -63,7 +63,7 @@ interface AssetManagerInterface
* AssetManagerInterface::RELATIVE_URL or AssetManagerInterface::INLINE
* constants.
*/
public function attachJs($content, $type = self::ABSOLUTE_URL);
public function attachJs($content, $type = self::RELATIVE_URL);
/**
* Retrieves all attached and provided by plugins JavaScript assets.
@ -89,7 +89,7 @@ interface AssetManagerInterface
* AssetManagerInterface::RELATIVE_URL or AssetManagerInterface::INLINE
* constants.
*/
public function attachCss($content, $type = self::ABSOLUTE_URL);
public function attachCss($content, $type = self::RELATIVE_URL);
/**
* Retrieves all attached and provided by plugins CSS assets.