Moved the contact info into the contacts controller.

git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@20 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-05-28 07:12:32 +00:00
parent ffe04ed6fd
commit 4923712238
6 changed files with 87 additions and 340 deletions

View File

@@ -0,0 +1,21 @@
<?php
class ContactsController extends AppController {
var $helpers = array('Html');
function view($id = null) {
if (!$id) {
$this->Session->setFlash(__('Invalid Item.', true));
$this->redirect(array('action'=>''));
}
$this->Contact->recursive = 4;
$this->Contact->Lease->LeaseType->unbindModel(array('hasMany' => array('Lease')));
$this->Contact->Lease->Charge->unbindModel(array('belongsTo' => array('Lease')));
$this->Contact->Lease->Charge->ChargeType->unbindModel(array('hasMany' => array('Charge')));
$this->Contact->Lease->Charge->Receipt->unbindModel(array('hasMany' => array('ChargesReceipt')));
$this->set('tenant', $this->Contact->read(null, $id));
}
}
?>