Last active
August 29, 2015 14:24
-
-
Save wizhippo/bf88813345fb1cf8a80d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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