Permalink
Browse files

call helpers with CakePHP1.3 way

  • Loading branch information...
1 parent a877551 commit ee68aaa9b75610b92c071ebbe7dbf84a413b59d0 @ichikaway committed Apr 21, 2011
View
@@ -1,27 +1,27 @@
<div class="Geos form">
-<?php echo $form->create('Geo' , array( 'type' => 'post' ));?>
+<?php echo $this->Form->create('Geo' , array( 'type' => 'post' ));?>
<fieldset>
<legend><?php __('Add Geo');?></legend>
<?php
- echo $form->input('title');
- echo $form->input('body');
- echo $form->input('Geo.loc.lat', array('label' => 'latitude'));
- echo $form->input('Geo.loc.long', array('label' => 'longitude'));
+ echo $this->Form->input('title');
+ echo $this->Form->input('body');
+ echo $this->Form->input('Geo.loc.lat', array('label' => 'latitude'));
+ echo $this->Form->input('Geo.loc.long', array('label' => 'longitude'));
?>
</fieldset>
-<?php echo $form->end('Submit');?>
+<?php echo $this->Form->end('Submit');?>
</div>
<div class="actions">
<ul>
- <li><?php echo $html->link(__('List Geos', true), array('action'=>'index'));?></li>
+ <li><?php echo $this->Html->link(__('List Geos', true), array('action'=>'index'));?></li>
</ul>
</div>
</fieldset>
-<?php echo $form->end('Submit');?>
+<?php echo $this->Form->end('Submit');?>
</div>
<div class="actions">
<ul>
- <li><?php echo $html->link(__('List Geos', true), array('action'=>'index'));?></li>
+ <li><?php echo $this->Html->link(__('List Geos', true), array('action'=>'index'));?></li>
</ul>
</div>
@@ -1,17 +1,17 @@
-<?php echo $html->link('Add data', 'add'); ?>
+<?php echo $this->Html->link('Add data', 'add'); ?>
<br>
<br>
<?php foreach($results as $result): ?>
id: <?php echo $result['Geo']['_id']; ?>
- [<?php echo $html->link('delete','delete/'.$result['Geo']['_id']); ?>]
+ [<?php echo $this->Html->link('delete','delete/'.$result['Geo']['_id']); ?>]
[<?php
$url = array('action' => 'index', 'near', $result['Geo']['loc']['lat'], $result['Geo']['loc']['long']);
- echo $html->link('near here', $url);
+ echo $this->Html->link('near here', $url);
?>]
[<?php
$url = array('action' => 'index', 'circle', $result['Geo']['loc']['lat'], $result['Geo']['loc']['long'], 10);
- echo $html->link('around here', $url);
+ echo $this->Html->link('around here', $url);
?>]
<br>
title: <?php echo h($result['Geo']['title']); ?><br>
@@ -1,17 +1,17 @@
<div class="posts form">
-<?php echo $form->create('Post' , array( 'type' => 'post' ));?>
+<?php echo $this->Form->create('Post' , array( 'type' => 'post' ));?>
<fieldset>
<legend><?php __('Add Post');?></legend>
<?php
- echo $form->input('title');
- echo $form->input('body');
- echo $form->input('hoge');
+ echo $this->Form->input('title');
+ echo $this->Form->input('body');
+ echo $this->Form->input('hoge');
?>
</fieldset>
-<?php echo $form->end('Submit');?>
+<?php echo $this->Form->end('Submit');?>
</div>
<div class="actions">
<ul>
- <li><?php echo $html->link(__('List Posts', true), array('action'=>'index'));?></li>
+ <li><?php echo $this->Html->link(__('List Posts', true), array('action'=>'index'));?></li>
</ul>
-</div>
+</div>
@@ -1,18 +1,18 @@
<div class="posts form">
-<?php echo $form->create('Post' , array( 'type' => 'post' ));?>
+<?php echo $this->Form->create('Post' , array( 'type' => 'post' ));?>
<fieldset>
<legend><?php __('Edit Post');?></legend>
<?php
- echo $form->hidden('_id');
- echo $form->input('title');
- echo $form->input('body');
- echo $form->input('hoge');
+ echo $this->Form->hidden('_id');
+ echo $this->Form->input('title');
+ echo $this->Form->input('body');
+ echo $this->Form->input('hoge');
?>
</fieldset>
-<?php echo $form->end('Submit');?>
+<?php echo $this->Form->end('Submit');?>
</div>
<div class="actions">
<ul>
- <li><?php echo $html->link(__('List Posts', true), array('action'=>'index'));?></li>
+ <li><?php echo $this->Html->link(__('List Posts', true), array('action'=>'index'));?></li>
</ul>
-</div>
+</div>
@@ -1,12 +1,12 @@
-<?php echo $html->link('Add data', 'add'); ?>
+<?php echo $this->Html->link('Add data', 'add'); ?>
<br>
<br>
<?php foreach($results as $result): ?>
- id: <?php echo $result['Post']['_id']; ?> [<?php echo $html->link('edit','edit/'.$result['Post']['_id']); ?>] [<?php echo $html->link('delete','delete/'.$result['Post']['_id']); ?>]<br>
+ id: <?php echo $result['Post']['_id']; ?> [<?php echo $this->Html->link('edit','edit/'.$result['Post']['_id']); ?>] [<?php echo $this->Html->link('delete','delete/'.$result['Post']['_id']); ?>]<br>
title: <?php echo $result['Post']['title']; ?><br>
body: <?php echo $result['Post']['body']; ?><br>
hoge: <?php echo $result['Post']['hoge']; ?><br>
<hr>
-<?php endforeach; ?>
+<?php endforeach; ?>
@@ -1,31 +1,31 @@
<div class="Subdocuments form">
-<?php echo $form->create('Subdocument' , array( 'type' => 'post' ));?>
+<?php echo $this->Form->create('Subdocument' , array( 'type' => 'post' ));?>
<fieldset>
<legend><?php __('Add Subdocument');?></legend>
<?php
- echo $form->input('title');
- echo $form->input('body');
- //echo $form->input('subdoc.name');
- //echo $form->input('subdoc.age');
- echo $form->input('Subdocument.subdoc.0.name');
- echo $form->input('Subdocument.subdoc.0.age');
- echo $form->input('Subdocument.subdoc.1.name');
- echo $form->input('Subdocument.subdoc.1.age');
+ echo $this->Form->input('title');
+ echo $this->Form->input('body');
+ //echo $this->Form->input('subdoc.name');
+ //echo $this->Form->input('subdoc.age');
+ echo $this->Form->input('Subdocument.subdoc.0.name');
+ echo $this->Form->input('Subdocument.subdoc.0.age');
+ echo $this->Form->input('Subdocument.subdoc.1.name');
+ echo $this->Form->input('Subdocument.subdoc.1.age');
?>
</fieldset>
-<?php echo $form->end('Submit');?>
+<?php echo $this->Form->end('Submit');?>
</div>
<div class="actions">
<ul>
- <li><?php echo $html->link(__('List Subdocuments', true), array('action'=>'index'));?></li>
+ <li><?php echo $this->Html->link(__('List Subdocuments', true), array('action'=>'index'));?></li>
</ul>
</div>
</fieldset>
-<?php echo $form->end('Submit');?>
+<?php echo $this->Form->end('Submit');?>
</div>
<div class="actions">
<ul>
- <li><?php echo $html->link(__('List Subdocuments', true), array('action'=>'index'));?></li>
+ <li><?php echo $this->Html->link(__('List Subdocuments', true), array('action'=>'index'));?></li>
</ul>
-</div>
+</div>
@@ -1,21 +1,21 @@
<div class="Subdocuments form">
-<?php echo $form->create('Subdocument' , array( 'type' => 'post' ));?>
+<?php echo $this->Form->create('Subdocument' , array( 'type' => 'post' ));?>
<fieldset>
<legend><?php __('Edit Subdocument');?></legend>
<?php
- echo $form->hidden('_id');
- echo $form->input('title');
- echo $form->input('body');
- echo $form->input('Subdocument.subdoc.0.name');
- echo $form->input('Subdocument.subdoc.0.age');
- echo $form->input('Subdocument.subdoc.1.name');
- echo $form->input('Subdocument.subdoc.1.age');
+ echo $this->Form->hidden('_id');
+ echo $this->Form->input('title');
+ echo $this->Form->input('body');
+ echo $this->Form->input('Subdocument.subdoc.0.name');
+ echo $this->Form->input('Subdocument.subdoc.0.age');
+ echo $this->Form->input('Subdocument.subdoc.1.name');
+ echo $this->Form->input('Subdocument.subdoc.1.age');
?>
</fieldset>
-<?php echo $form->end('Submit');?>
+<?php echo $this->Form->end('Submit');?>
</div>
<div class="actions">
<ul>
- <li><?php echo $html->link(__('List Subdocuments', true), array('action'=>'index'));?></li>
+ <li><?php echo $this->Html->link(__('List Subdocuments', true), array('action'=>'index'));?></li>
</ul>
-</div>
+</div>
@@ -1,9 +1,9 @@
-<?php echo $html->link('Add data', 'add'); ?>
+<?php echo $this->Html->link('Add data', 'add'); ?>
<br>
<br>
<?php foreach($results as $result): ?>
- id: <?php echo $result['Subdocument']['_id']; ?> [<?php echo $html->link('edit','edit/'.$result['Subdocument']['_id']); ?>] [<?php echo $html->link('delete','delete/'.$result['Subdocument']['_id']); ?>]<br>
+ id: <?php echo $result['Subdocument']['_id']; ?> [<?php echo $this->Html->link('edit','edit/'.$result['Subdocument']['_id']); ?>] [<?php echo $this->Html->link('delete','delete/'.$result['Subdocument']['_id']); ?>]<br>
title: <?php echo $result['Subdocument']['title']; ?><br>
body: <?php echo $result['Subdocument']['body']; ?><br>
<?php foreach($result['Subdocument']['subdoc'] as $num => $val): ?>
@@ -12,4 +12,4 @@
<?php endforeach; ?>
<hr>
-<?php endforeach; ?>
+<?php endforeach; ?>

0 comments on commit ee68aaa

Please sign in to comment.