Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added scaled image demonstration

  • Loading branch information...
commit 6a181219747953b1bf3e141d63772239d122a91f 1 parent 31b4e26
@weierophinney authored
View
1  mobile-app/.vimproject
@@ -30,6 +30,7 @@ mobile-app=/home/matthew/git/zf-examples/mobile-app CD=. filter="*.php *.phtml *
}
mobile=mobile {
details.phtml
+ image.phtml
index.phtml
}
}
View
4 mobile-app/.zfproject.xml
@@ -15,6 +15,7 @@
<controllerFile controllerName="Mobile">
<actionMethod actionName="index"/>
<actionMethod actionName="details"/>
+ <actionMethod actionName="image"/>
</controllerFile>
</controllersDirectory>
<formsDirectory enabled="false"/>
@@ -35,6 +36,9 @@
<viewControllerScriptsDirectory forControllerName="Mobile">
<viewScriptFile forActionName="details"/>
</viewControllerScriptsDirectory>
+ <viewControllerScriptsDirectory forControllerName="Mobile">
+ <viewScriptFile forActionName="image"/>
+ </viewControllerScriptsDirectory>
</viewScriptsDirectory>
<viewHelpersDirectory/>
<viewFiltersDirectory enabled="false"/>
View
11 mobile-app/application/controllers/MobileController.php
@@ -16,6 +16,15 @@ public function indexAction()
public function detailsAction()
{
$ua = $this->getInvokeArg('bootstrap')->getResource('useragent');
- $this->view->device = $ua->getDevice();
+ $this->view->device = $ua->getDevice();
}
+
+ public function imageAction()
+ {
+ // action body
+ }
+
+
}
+
+
View
5 mobile-app/application/views/scripts/index/index.phtml
@@ -13,4 +13,9 @@
'controller' => 'mobile',
'action' => 'details',
), 'default') ?>">List of mobile capabilities</a></li>
+
+ <li><a href="<?php echo $this->url(array(
+ 'controller' => 'mobile',
+ 'action' => 'image',
+ ), 'default') ?>">Scaled image</a></li>
<?php $this->placeholder('sidebar')->captureEnd() ?>
View
5 mobile-app/application/views/scripts/mobile/details.phtml
@@ -17,4 +17,9 @@
'controller' => 'index',
'action' => 'index',
), 'default') ?>">Home</a></li>
+
+ <li><a href="<?php echo $this->url(array(
+ 'controller' => 'mobile',
+ 'action' => 'image',
+ ), 'default') ?>">Scaled image</a></li>
<?php $this->placeholder('sidebar')->captureEnd() ?>
View
17 mobile-app/application/views/scripts/mobile/image.phtml
@@ -0,0 +1,17 @@
+<h2>Scaled Image</h2>
+
+<p>
+ <?php echo $this->tinySrc('/images/seascape.jpg') ?>
+</p>
+
+<?php $this->placeholder('sidebar')->captureStart() ?>
+ <li><a href="<?php echo $this->url(array(
+ 'controller' => 'index',
+ 'action' => 'index',
+ ), 'default') ?>">Home</a></li>
+
+ <li><a href="<?php echo $this->url(array(
+ 'controller' => 'mobile',
+ 'action' => 'details',
+ ), 'default') ?>">List of mobile capabilities</a></li>
+<?php $this->placeholder('sidebar')->captureEnd() ?>
View
BIN  mobile-app/public/images/seascape.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.