24 return $this->
copy($this->packages);
40 $name = isset($package[
'name']) ? $package[
'name'] :
'__component__';
41 $extra = isset($package[
'extra']) ? $package[
'extra'] :
array();
45 $fileType =
array(
'scripts',
'styles',
'files');
46 foreach ($fileType as $type) {
48 if (isset($extra[
'component'][$type]) && is_array($extra[
'component'][$type])) {
49 foreach ($extra[
'component'][$type] as
$file) {
51 $source = $packageDir.DIRECTORY_SEPARATOR.$file;
54 foreach ($this->fs->recursiveGlobFiles($source) as $filesource) {
56 $withoutPackageDir = str_replace($packageDir.DIRECTORY_SEPARATOR,
'', $filesource);
59 $destination = $this->componentDir.DIRECTORY_SEPARATOR.$componentName.DIRECTORY_SEPARATOR.$withoutPackageDir;
62 $this->fs->ensureDirectoryExists(dirname($destination));
65 copy($filesource, $destination);
process()
{Called when running through the process.boolean True or false depending on whether the process was s...
Process which copies components from their source to the components folder.
copy($packages)
Copy file assets from the given packages to the component directory.
getComponentName($prettyName, array $extra=array())
Retrieves the component name for the component.
getVendorDir(array $package)
Retrieves the given package's vendor directory, where it's installed.
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file