Skip to content

Commit ec69fc9

Browse files
author
Codeliner
committed
Merge branch 'SetupNavigationFeature' into BookingAppIntroductionStory
2 parents 9a06e86 + 5f0b34a commit ec69fc9

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "vendor/ZF2"]
2+
path = vendor/ZF2
3+
url = https://github.com/zendframework/zf2.git

config/application.config.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
return array(
33
// This should be an array of module namespaces used in the application.
44
'modules' => array(
5+
'DoctrineModule',
6+
'DoctrineORMModule',
7+
'ZfcTwitterBootstrap',
58
'Application',
69
),
710

module/Application/config/module.config.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
),
5454
),
5555
'service_manager' => array(
56+
'factories' => array(
57+
'main_navigation' => 'Zend\Navigation\Service\DefaultNavigationFactory',
58+
),
5659
'abstract_factories' => array(
5760
'Zend\Cache\Service\StorageCacheAbstractServiceFactory',
5861
'Zend\Log\LoggerAbstractServiceFactory',
@@ -92,6 +95,14 @@
9295
__DIR__ . '/../view',
9396
),
9497
),
98+
'navigation' => array(
99+
'default' => array(
100+
'home' => array(
101+
'route' => 'home',
102+
'label' => 'home'
103+
)
104+
)
105+
),
95106
// Placeholder for console routes
96107
'console' => array(
97108
'router' => array(

module/Application/view/application/index/index.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<h3 class="panel-title"><?php echo $this->translate('Goal of the Sample Application') ?></h3>
1111
</div>
1212
<div class="panel-body">
13-
<p><?php echo sprintf($this->translate('The Cargo Shipping System is based on the example used in Eric Evans book Domain Driven Design: Tackling Complexity in the Heart of Software. It\'s a PHP Version of the Cargo Sample to show how DDD can be applied in a PHP Project. %sZend Framework 2%s is used as a basis for the application layer and %sdoctrine 2%s is used for the infrastructure layer.'), '<a href="http://framework.zend.com/" target="_blank">', '</a>', '<a href="http://www.doctrine-project.org/" target="_blank">', '</a>') ?></p>
13+
<p><?php echo sprintf($this->translate('The Cargo Shipping System is based on the example used in Eric Evans book Domain Driven Design: Tackling Complexity in the Heart of Software. It\'s a PHP Version of the Cargo Sample to show how DDD can be applied to a PHP Project. %sZend Framework 2%s is used as a basis for the application layer and %sdoctrine 2%s is used for the infrastructure layer.'), '<a href="http://framework.zend.com/" target="_blank">', '</a>', '<a href="http://www.doctrine-project.org/" target="_blank">', '</a>') ?></p>
1414
</div>
1515
</div>
1616
</div>

module/Application/view/layout/layout.phtml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html lang="en">
44
<head>
55
<meta charset="utf-8">
6-
<?php echo $this->headTitle('ZF2 '. $this->translate('Skeleton Application'))->setSeparator(' - ')->setAutoEscape(false) ?>
6+
<?php echo $this->headTitle('PHP '. $this->translate('Cargo Shipping Application'))->setSeparator(' - ')->setAutoEscape(false) ?>
77

88
<?php echo $this->headMeta()
99
->appendName('viewport', 'width=device-width, initial-scale=1.0')
@@ -28,18 +28,11 @@
2828
<body>
2929
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
3030
<div class="container">
31-
<div class="navbar-header">
32-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
33-
<span class="icon-bar"></span>
34-
<span class="icon-bar"></span>
35-
<span class="icon-bar"></span>
36-
</button>
37-
<a class="navbar-brand" href="<?php echo $this->url('home') ?>"><img src="<?php echo $this->basePath('img/zf2-logo.png') ?>" alt="Zend Framework 2"/>&nbsp;<?php echo $this->translate('Skeleton Application') ?></a>
31+
<div class="navbar-header">
32+
<a class="navbar-brand" href="<?php echo $this->url('home') ?>"><?php echo $this->translate('PHP Cargo Shipping System') ?></a>
3833
</div>
3934
<div class="collapse navbar-collapse">
40-
<ul class="nav navbar-nav">
41-
<li class="active"><a href="<?php echo $this->url('home') ?>"><?php echo $this->translate('Home') ?></a></li>
42-
</ul>
35+
<?php echo $this->ztbnavigation('main_navigation')->ztbmenu()->setUlClass('nav navbar-nav'); ?>
4336
</div><!--/.nav-collapse -->
4437
</div>
4538
</nav>

0 commit comments

Comments
 (0)