Skip to content

Commit bbfb73b

Browse files
committed
updates
1 parent cb43dab commit bbfb73b

File tree

480 files changed

+81954
-5241
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

480 files changed

+81954
-5241
lines changed

CMSBundle.php

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace SmartCore\Bundle\CMSBundle;
4+
5+
use SmartCore\Bundle\CMSBundle\DependencyInjection\Compiler\FormPass;
6+
use SmartCore\Bundle\CMSBundle\DependencyInjection\Compiler\ModulesRoutingResolverPass;
7+
use SmartCore\Bundle\CMSBundle\DependencyInjection\Compiler\RemoveTagcacheActionCacheListenerPass;
8+
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
9+
use Symfony\Component\DependencyInjection\ContainerBuilder;
10+
use Symfony\Component\HttpKernel\Bundle\Bundle;
11+
12+
class CMSBundle extends Bundle
13+
{
14+
public function boot()
15+
{
16+
Container::setContainer($this->container);
17+
}
18+
19+
public function build(ContainerBuilder $container)
20+
{
21+
parent::build($container);
22+
23+
$container->addCompilerPass(new ModulesRoutingResolverPass());
24+
$container->addCompilerPass(new FormPass());
25+
$container->addCompilerPass(new RemoveTagcacheActionCacheListenerPass()); //, PassConfig::TYPE_AFTER_REMOVING);
26+
}
27+
}

Command/FolderCreateCommand.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace SmartCore\Bundle\EngineBundle\Command;
3+
namespace SmartCore\Bundle\CMSBundle\Command;
44

55
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
66
//use Symfony\Component\Console\Command\Command;
@@ -14,7 +14,7 @@ class FolderCreateCommand extends ContainerAwareCommand
1414
protected function configure()
1515
{
1616
$this
17-
->setName('engine:folder:create')
17+
->setName('cms:folder:create')
1818
->setDescription('@todo| Create new folder.')
1919
->addArgument('uri_part', InputArgument::OPTIONAL, 'URI part')
2020
->addArgument('name', InputArgument::OPTIONAL, 'Name')
@@ -24,6 +24,5 @@ protected function configure()
2424

2525
protected function execute(InputInterface $input, OutputInterface $output)
2626
{
27-
2827
}
29-
}
28+
}

Command/SiteAllCommand.php

-26
This file was deleted.

Command/SiteCreateCommand.php

-42
This file was deleted.

Command/SiteDomainCommand.php

-29
This file was deleted.

Command/SiteSetDefaultCommand.php

-26
This file was deleted.

Container.php

+51-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,69 @@
11
<?php
22

3-
namespace SmartCore\Bundle\EngineBundle;
3+
namespace SmartCore\Bundle\CMSBundle;
4+
5+
use Symfony\Component\DependencyInjection\ContainerInterface;
46

5-
/**
6-
* @todo избавиться
7-
*/
87
class Container
98
{
10-
static private $container;
9+
/**
10+
* @var ContainerInterface
11+
*/
12+
private static $container;
1113

12-
static public function get($name)
14+
/**
15+
* @param string $name
16+
*
17+
* @return ContainerInterface
18+
*/
19+
public static function get($name)
1320
{
1421
return self::$container->get($name);
1522
}
1623

17-
static public function set($container)
24+
/**
25+
* @param string $name
26+
*
27+
* @return ContainerInterface
28+
*/
29+
public static function has($name)
30+
{
31+
return self::$container->has($name);
32+
}
33+
34+
/**
35+
* @param ContainerInterface $container
36+
*/
37+
public static function setContainer(ContainerInterface $container)
1838
{
1939
self::$container = $container;
2040
}
2141

22-
static public function getContainer()
42+
/**
43+
* @return ContainerInterface
44+
*/
45+
public static function getContainer()
2346
{
2447
return self::$container;
2548
}
49+
50+
/**
51+
* @param string $name
52+
*
53+
* @return mixed
54+
*/
55+
public static function getParameter($name)
56+
{
57+
return self::$container->getParameter($name);
58+
}
59+
60+
/**
61+
* @param string $name
62+
*
63+
* @return mixed
64+
*/
65+
public static function hasParameter($name)
66+
{
67+
return self::$container->hasParameter($name);
68+
}
2669
}

0 commit comments

Comments
 (0)