Added phone and address models as well as outputing them to the view.

git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@16 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-05-28 06:31:07 +00:00
parent df846f9963
commit 28bf192853
5 changed files with 194 additions and 12 deletions

View File

@@ -0,0 +1,28 @@
<?php
class ContactAddress extends AppModel {
var $name = 'ContactAddress';
var $validate = array(
'id' => array('numeric'),
'postcode' => array('postal')
);
var $hasAndBelongsToMany = array(
'Contact' => array(
'className' => 'Contact',
'joinTable' => 'contacts_methods',
'foreignKey' => 'method_id',
'associationForeignKey' => 'contact_id',
'unique' => true,
'conditions' => "ContactsMethod.method = 'POST'",
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
)
);
}
?>