Skip to content

Instantly share code, notes, and snippets.

@wizhippo
Created September 2, 2015 21:07
Show Gist options
  • Save wizhippo/eca58cd9ebc6fff7b1a6 to your computer and use it in GitHub Desktop.
Save wizhippo/eca58cd9ebc6fff7b1a6 to your computer and use it in GitHub Desktop.
<?php
namespace TestBundle\Command;
use Doctrine\DBAL\Connection;
use GuzzleHttp\Client;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class TestSiteAccessCommand extends ContainerAwareCommand
{
/**
* @inheritdoc
*/
protected function configure()
{
$this
->setName('assocsite:testsiteaccess')
->setDescription('Show site access');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$container = $this->getContainer();
$siteAccess = $container->get('ezpublish.siteaccess');
$siteAccessDefault = $container->getParameter('ezpublish.siteaccess.default');
$siteAccessDefaultName = $container->getParameter('ezpublish.siteaccess.default.name');
print_r($siteAccess);
print_r($siteAccessDefault);
print_r($siteAccessDefaultName);
$var_dir = $container->get('ezpublish.config.resolver')->getParameter('var_dir');
print_r($var_dir);
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment