TypeIndividual/models/ObjectIndividual.php
public function getPhotoEmail()
    {
        $email = false;
        $emailType = Yii::$app->collectors['types']->getOne('EmailAddress');
        if (empty($emailType->object)) {
            return false;
        }
        foreach ($this->children($emailType->object->primaryModel, ['where' => ['primary_child' => 1]]) as $child) {
            $email = $child->email_address;
            break;
        }
        if (!empty($email) && substr($email, -6) !== ".local") {
            return $email;
        }

        return false;
    }
public function getPhotoEmail()
    {
        $email = false;
        $emailType = Yii::$app->collectors['types']->getOne('EmailAddress');
        if (empty($emailType->object)) {
            return false;
        }
        foreach ($this->children($emailType->object->primaryModel, ['where' => ['primary_child' => 1]]) as $child) {
            $email = $child->email_address;
            break;
        }
        if (!empty($email) && substr($email, -6) !== ".local") {
            return $email;
        }

        return false;
    }
public function getPhotoEmail ( ) { $ email = false ; $ emailType = Yii :: $ app -> collectors [ 'types' ] -> getOne ( 'EmailAddress' ) ; if ( empty ( $ emailType -> object ) ) { return false ; } foreach ( $ this -> children ( $ emailType -> object -> primaryModel , [ 'where' => [ 'primary_child' => 1 ] ] ) as $ child ) { $ email = $ child -> email_address ; break ; } if ( ! empty ( $ email ) && substr ( $ email , - 6 ) !== ".local" ) { return $ email ; } return false ; }
Get photo email.

@return [[@doctodo return_type:getPhotoEmail]] [[@doctodo return_description:getPhotoEmail]]
Get photo email .