Component
class
Core\Controller\Component\Component
Loads a CSS and/or Javascript component for the front-end user interface, and processes its metadata and dependencies.
Properties
Methods
__construct(string $name, string $dir = null, string $publicDir = null)
Component constructor.
string[]
get_component_files()
string|boolean
get_component_source(boolean $prettify = false)
Get the source repository or URL of the component. Returns false
if
unknown.
string|boolean
get_component_version()
Returns the version of the component if available, otherwise returns
false
.
string
getCode(boolean $comments = false)
Get <link>
and <script>
tags HTML string to embed the element in
your HTML code.
array
get_files(string $type)
Get a list of all of the component's required files with a specific file extension.
array
getComponentDependencies()
Get an array of dependencies of the component. The array contains
associative arrays per dependency with fields name
and version
.