Aimeos\ShopBundle\Composer\ScriptHandler::installBundle PHP Method

installBundle() public static method

Installs the shop bundle.
public static installBundle ( Composer\Script\CommandEvent $event )
$event Composer\Script\CommandEvent CommandEvent instance
    public static function installBundle(CommandEvent $event)
    {
        $event->getIO()->write('Installing the Aimeos shop bundle');
        $options = self::getOptions($event);
        if (!isset($options['symfony-app-dir']) || !is_dir($options['symfony-app-dir'])) {
            $msg = 'An error occurred because the "%1$s" option or the "%2$s" directory isn\'t available';
            throw new \RuntimeException(sprintf($msg, 'symfony-app-dir', $options['symfony-app-dir']));
        }
        if (!isset($options['symfony-web-dir']) || !is_dir($options['symfony-web-dir'])) {
            $msg = 'An error occurred because the "%1$s" option or the "%2$s" directory isn\'t available';
            throw new \RuntimeException(sprintf($msg, 'symfony-web-dir', $options['symfony-web-dir']));
        }
        self::createDirectory($options['symfony-app-dir'] . '/secure');
        self::createDirectory($options['symfony-web-dir'] . '/uploads');
        self::createDirectory($options['symfony-web-dir'] . '/preview');
        self::createDirectory($options['symfony-web-dir'] . '/files');
    }