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 getFullName()
{
if (!$this->first_name && !$this->last_name)
{
return $this->email;
}
$fullName = $this->first_name . ' ' . $this->last_name;
if ($fullName == ' ')
{
return '';
}
else
{
return $fullName;
}
}
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; } }