belongsTo('Client');
}
public function getPersonType()
{
return PERSON_CONTACT;
}
/*
public function getLastLogin()
{
if ($this->last_login == '0000-00-00 00:00:00')
{
return '---';
}
else
{
return $this->last_login->format('m/d/y h:i a');
}
}
*/
public function getDisplayName()
{
if ($this->getFullName())
{
return $this->getFullName();
}
else
{
return $this->email;
}
}
public function getFullName()
{
if ($this->first_name || $this->last_name)
{
return $this->first_name . ' ' . $this->last_name;
}
else
{
return '';
}
}
public function getDetails()
{
$str = '';
if ($this->first_name || $this->last_name)
{
$str .= '' . $this->first_name . ' ' . $this->last_name . '
';
}
if ($this->email)
{
$str .= '' . HTML::mailto($this->email, $this->email) . '
';
}
if ($this->phone)
{
$str .= '' . Utils::formatPhoneNumber($this->phone);
}
if ($str)
{
$str = '
' . $str . '
'; } return $str; } }