-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9de9506
commit 6b27e7e
Showing
5 changed files
with
74 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
/** | ||
* GpsLab component. | ||
* | ||
* @author Peter Gribanov <info@peter-gribanov.ru> | ||
* @copyright Copyright (c) 2016, Peter Gribanov | ||
* @license http://opensource.org/licenses/MIT | ||
*/ | ||
|
||
namespace GpsLab\Bundle\DateBundle\DependencyInjection; | ||
|
||
use Symfony\Component\Config\Definition\Builder\TreeBuilder; | ||
use Symfony\Component\Config\Definition\ConfigurationInterface; | ||
|
||
class Configuration implements ConfigurationInterface | ||
{ | ||
/** | ||
* Config tree builder. | ||
* | ||
* Example config: | ||
* | ||
* gps_lab_date: | ||
* time_zone: 'Europe/Moscow' | ||
* cookie: | ||
* name: '_time_zone_name' | ||
* offset: '_time_zone_offset' | ||
* | ||
* @return TreeBuilder | ||
*/ | ||
public function getConfigTreeBuilder() | ||
{ | ||
return (new TreeBuilder()) | ||
->root('gps_lab_date') | ||
->addDefaultsIfNotSet() | ||
->children() | ||
->scalarNode('time_zone') | ||
->end() | ||
->arrayNode('cookie') | ||
->children() | ||
->scalarNode('name') | ||
->cannotBeEmpty() | ||
->defaultValue('_time_zone_name') | ||
->end() | ||
->scalarNode('offset') | ||
->cannotBeEmpty() | ||
->defaultValue('_time_zone_offset') | ||
->end() | ||
->end() | ||
->end() | ||
->end(); | ||
} | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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