src/Trident/Module/FrameworkModule/Console/Command/AssetsInstallCommand.php
private function installAssets(\TridentKernel $kernel, $name, $from, OutputInterface $output)
    {
        $output->write(sprintf('Installing assets for "%s"', $name));

        $filesystem = new FileSystem();

        if ( ! $filesystem->exists($from)) {
            // If there were no assets to install
            $output->writeln('... <comment>N/A</comment>');
            return;
        }

        try {
            $filesystem->symlink($from, $kernel->getAssetDir().'/'.strtolower($name));

            // If assets were found, and successfully installed:
            $output->writeln('... <info>Done</info>');
        } catch(IOExceptionInterface $e) {
            // If there were any problems installing assets:
            $output->writeln('... <error>Error</error>');
        }
    }
private function installAssets(\TridentKernel $kernel, $name, $from, OutputInterface $output)
    {
        $output->write(sprintf('Installing assets for "%s"', $name));

        $filesystem = new FileSystem();

        if ( ! $filesystem->exists($from)) {
            // If there were no assets to install
            $output->writeln('... <comment>N/A</comment>');
            return;
        }

        try {
            $filesystem->symlink($from, $kernel->getAssetDir().'/'.strtolower($name));

            // If assets were found, and successfully installed:
            $output->writeln('... <info>Done</info>');
        } catch(IOExceptionInterface $e) {
            // If there were any problems installing assets:
            $output->writeln('... <error>Error</error>');
        }
    }
private function installAssets ( \ TridentKernel $ kernel , $ name , $ from , OutputInterface $ output ) { $ output -> write ( sprintf ( 'Installing assets for "%s"' , $ name ) ) ; $ filesystem = new FileSystem ( ) ; if ( ! $ filesystem -> exists ( $ from ) ) { // If there were no assets to install $ output -> writeln ( '... <comment>N/A</comment>' ) ; return ; } try { $ filesystem -> symlink ( $ from , $ kernel -> getAssetDir ( ) . '/' . strtolower ( $ name ) ) ; // If assets were found, and successfully installed: $ output -> writeln ( '... <info>Done</info>' ) ; } catch ( IOExceptionInterface $ e ) { // If there were any problems installing assets: $ output -> writeln ( '... <error>Error</error>' ) ; } }
Install assets from on directory to another.

@param \TridentKernel  $kernel
@param string          $name
@param string          $from
@param OutputInterface $output
Install assets from on directory to another .