Back to Joomla project (class list)

Class WebAssetItemInterface - list of methods

Web Asset Item interface
Asset Item are "read only" object, all properties must be set through class constructor. Only properties allowed to be edited is an attributes and an options. Changing an uri or a dependencies are not allowed, prefer to create a new asset instance.
Package: Joomla\CMS\WebAsset
Copyright: (C) 2019 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/WebAsset/WebAssetItemInterface.php
Project: Joomla

Method Summary

public string
()

Return Asset name
Returns
  • string
Since
  • 4.0.0
Show source code of this method: getName Source Code

public string
()

Return Asset version
Returns
  • string
Since
  • 4.0.0
Show source code of this method: getVersion Source Code

public array
()

Return dependencies list
Returns
  • array
Since
  • 4.0.0
Show source code of this method: getDependencies Source Code

public string
(mixed $resolvePath = true)

Get the URI of the asset
Parameters
  • bool $resolvePath Whether need to search for a real paths
Returns
  • string
Since
  • 4.0.0
Show source code of this method: getUri Source Code

public mixed
(string $key, mixed $default = null)

Get the option
Parameters
  • string $key An option key
  • string $default A default value
Returns
  • mixed
Since
  • 4.0.0
Show source code of this method: getOption Source Code

public self
(string $key, mixed $value = null)

Set the option
Parameters
  • string $key An option key
  • string $value An option value
Returns
  • self
Since
  • 4.0.0
Show source code of this method: setOption Source Code

public array
()

Get all options of the asset
Returns
  • array
Since
  • 4.0.0
Show source code of this method: getOptions Source Code

public mixed
(string $key, mixed $default = null)

Get the attribute
Parameters
  • string $key An attributes key
  • string $default A default value
Returns
  • mixed
Since
  • 4.0.0
Show source code of this method: getAttribute Source Code

public self
(string $key, mixed $value = null)

Set the attribute
Parameters
  • string $key An attribute key
  • string $value An attribute value
Returns
  • self
Since
  • 4.0.0
Show source code of this method: setAttribute Source Code

public array
()

Get all attributes
Returns
  • array
Since
  • 4.0.0
Show source code of this method: getAttributes Source Code

Tags Summary

Since
4.0.0