/** * Return first webpage for this contact. * * @access public * @param void * @return ContactWebpage * @author Seba */ function getWebpage($type) { $webpage_type_id = WebpageTypes::getWebpageTypeId($type); return ContactWebpages::findOne(array('conditions' => array("`contact_id` = ? AND `web_type_id` = ?", $this->getId(), $webpage_type_id))); }