Skip to content

Commit

Permalink
fix the DOC block
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Mar 21, 2018
1 parent 68207df commit 0981706
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions libraries/src/HTML/HTMLHelper.php
Expand Up @@ -832,22 +832,22 @@ public static function script($file, $options = array(), $attribs = array())
}

/**
* Loads the name and path of a custom element or webcomponent into the scriptOptions object
* Loads the path of a custom element or webcomponent into the scriptOptions object
*
* @param string $component The path of the web component (expects the ES6 version).
* Also passing a key = fullPolyfill and value= true we force the whole polyfill instead
* of just the custom element. (Polyfills loaded as needed, no force load)
* @param array $options The relative, version, detect browser and detect debug options for the custom element
* or web component. Files need to have a -es5(.min).js (or -es5(.min).html) for the non ES6
* Browsers.
* @param string $file The path of the web component (expects the ES6 version). File need to have also an
* -es5(.min).js version in the same folder for the non ES6 Browsers.
* @param array $options The extra options for the script
*
* @since 4.0.0
*
* @see HTMLHelper::stylesheet()
* @see HTMLHelper::script()
*
* @return void
*/
public static function webcomponent(string $component, array $options = [])
public static function webcomponent(string $file, array $options = [])
{
if (empty($component))
if (empty($file))
{
return;
}
Expand All @@ -859,11 +859,11 @@ public static function webcomponent(string $component, array $options = [])
$mediaVersion = Factory::getDocument()->getMediaVersion();

// Add the css if exists
self::_('stylesheet', str_replace('.js', '.css', $component), $options);
self::_('stylesheet', str_replace('.js', '.css', $file), $options);

$includes = static::includeRelativeFiles(
'js',
$component,
$file,
$options['relative'] ?? true,
$options['detectBrowser'] ?? false,
$options['detectDebug'] ?? false
Expand Down

0 comments on commit 0981706

Please sign in to comment.