Skip to content

Instantly share code, notes, and snippets.

@wizhippo
Last active August 29, 2015 14:24
Show Gist options
  • Save wizhippo/bf88813345fb1cf8a80d to your computer and use it in GitHub Desktop.
Save wizhippo/bf88813345fb1cf8a80d to your computer and use it in GitHub Desktop.
<?php
namespace Example\Bundle\ConsumerSiteBundle\Command;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateSiteCommand extends ContainerAwareCommand
{
protected function configure()
{
$this->setName( 'consumer_site:create-site' );
}
protected function execute( InputInterface $input, OutputInterface $output )
{
$sa = $this->getContainer()->get( 'ezpublish.siteaccess' );
$output->writeln(print_r($sa, true));
/** @var $configResolver \eZ\Publish\Core\MVC\ConfigResolverInterface **/
$configResolver = $this->getContainer()->get( 'ezpublish.config.resolver' );
$prefix = $configResolver->getParameter('io.legacy_url_prefix');
$output->writeln(print_r($prefix, true));
}
}
eZ\Publish\Core\MVC\Symfony\SiteAccess Object
(
[name] => eng
[matchingType] => cli
[matcher] =>
)
var/storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment