Get contact Name

@Serializer\VirtualProperty
@Serializer\Type("string")
@Serializer\SerializedName("contact_name")
@Serializer\Groups({"ui", "api"})

@return string
960693
public function getContactName()
    {
        $name = false;
        $lastNames = false;

        if ($this->getContact()) {
            $name = $this->getContact()->getName();
            $lastNames = $this->getContact()->getLastNames();
        }

        if ($name == false && $lastNames == false) {
            return $this->getUsername();
        }

        return trim($name.' '.$lastNames);
    }
473589
public function getDisplayName()
    {
        $data = array_filter([
            $this->get(self::PROPERTY_FIRSTNAME),
            $this->get(self::PROPERTY_LASTNAME),
        ]);

        return implode(' ', $data);
    }
758104
public function getName()
    {
        if ($this->name === null) {
            $class = get_called_class();
            if (preg_match('/_+(.+)_+/', $class, $matches) > 0) {
                $this->name = $matches[1];
            } else {
                $this->name = '';
            }
        }

        return $this->name;
    }
1044307
public function getContactMessage()
    {
        if ($this->_sContactMessage === null) {
            $this->_sContactMessage = Registry::getConfig()->getRequestParameter('c_message');
        }

        return $this->_sContactMessage;
    }
647157
public function getAnyPhoneNumber()
    {
        $phoneNo    = null;
        $numbersRaw = $this->getFlexiData($this->getApiURL(),
            ['detail' => 'custom:id,mobil,tel,kontakty(primarni,mobil,tel)', 'relations' => 'kontakty']);
        if (is_array($numbersRaw) && !empty($numbersRaw[0])) {
            $numbers = $numbersRaw[0];
            if (array_key_exists('mobil', $numbers) && strlen(trim($numbers['mobil']))) {
                $phoneNo = $numbers['mobil'];
            }
            if (array_key_exists('tel', $numbers) && strlen(trim($numbers['tel']))) {
                $phoneNo = $numbers['tel'];
            }
            if (array_key_exists('kontakty', $numbers) && !empty($numbers['kontakty'])) {
                foreach ($numbers['kontakty'] as $kontakt) {
                    if ($kontakt['primarni'] == 'true') {
                        
                    }
                    if (strlen(trim($kontakt['mobil']))) {
                        $phoneNo = $kontakt['mobil'];
                        break;
                    } elseif (strlen(trim($kontakt['mobil']))) {
                        $phoneNo = $kontakt['mobil'];
                        break;
                    }
                }
            }
        }
        return $phoneNo;
    }
484175
public function getName() {

		$name = $this->getFullName();

		if( empty( $name ) ) {

			$name	= $this->username;

			if( empty( $name ) ) {

				$name	= preg_split( '/@/', $this->email );
				$name	= $name[ 0 ];
			}
		}

		return $name;
	}
1027043
public function getName()
    {
        /** @var Attendee $attendee */
        if (($mainContact = $this->MainContact()) && $mainContact->exists() && $name = $mainContact->getName()) {
            return $name;
        } else {
            return 'new reservation';
        }
    }
826217
public function virtualAttributesNames()
    {
        if (!empty($this->_virtualAttributes))
            return $this->_virtualAttributes;

        if (!is_array($this->virtualAttributes) || empty($this->virtualAttributes))
            return null;

        $attributes = [];
        foreach ($this->virtualAttributes as $a) {
            if (!in_array($a, $this->objAttributesNames()) && !in_array($a, $attributes)) {
                $attributes[] = $a;
            }
        }

        return !empty($attributes) ? $this->_virtualAttributes = $attributes : null;
    }
33182
public function getFieldName()
    {
        $ret = $this->getName();
        if ($this->getNamePrefix()) {
            $ret = $this->getNamePrefix() . '_' . $ret;
        }
        return $ret;
    }
884725
public function toString()
    {
        $email = $this->sender ? $this->sender->getEmail() : "null";

        $request = array();
        $request['Reference'] = $this->reference;
        $request['SenderEmail'] = $email;

        return "PagSeguroRequest: " . var_export($request, true);
    }
537559
public function getRegistrantContactFieldsGroup() {
		$fieldNames = array_unique($this->stat('registrant_fields'));
		$fields = FieldList::create();
		if ($fieldNames) {
			$scaffolded = $this->scaffoldFormFields(array(
				'restrictFields' => $fieldNames,
				'fieldClasses' => array(
					'Email' => 'EmailField'
				)
			));
			// order using registrant_fields config order
			foreach ($fieldNames as $name) {
				if ($field = $scaffolded->fieldByName($name)) {
					$fields->push($field);
				}
			}
		}
		$this->extend("updateRegistrantContactFields", $fields);
		return CompositeField::create($fields)
			->setName("RegistrantContactFields");
	}
598316
function createContact() {
    $cnt = count( $this->contact );
    if( 0 >= $cnt )
      return;
    $output = null;
    foreach( $this->contact as $contact ) {
      $attributes = $this->_createParams( $contact['params'], array( 'ALTREP', 'LANGUAGE' ));
      $content    = $this->_strrep( $contact['value'] );
      $output    .= $this->_createElement( 'CONTACT', $attributes, $content );
    }
    return $output;
  }
235085
public function getName()
    {
        if ($this->name) {
            return $this->name;
        }
        // Get from composer
        $json = $this->getJson();
        if (isset($json['name'])) {
            $this->name = $json['name'];
        }
        return $this->name;
    }
656056
public function getName() {
		if ($this->_name === null) {
			$name = get_class($this);
			$pos = strrpos($name, '\\');
			if ($pos !== false) {
				$name = substr($name, $pos + 1);
			}
			if (preg_match('/^Twig([A-Za-z]+)Extension$/', $name, $matches)) {
				$name = $matches[1];
			}
			$this->_name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
		}
		return $this->_name;
	}
102499
public function getNames()
    {
        $names = array_keys($this->getServices());
        $len = strlen(self::METHOD_PREFIX);
        foreach (get_class_methods($this) as $method) {
            if (Text::startsWith($method, self::METHOD_PREFIX)) {
                $name = lcfirst(substr($method, $len));
                if ($name) {
                    $names[] = $name;
                }
            }
        }
        return $names;
    }
1026586
public function getCollectionName()
    {
        if (isset($this->vObj)) {
            return isset($this->vObj->cvName) ? $this->vObj->cvName : null;
        }

        return isset($this->cvName) ? $this->cvName : null;
    }
446329
public function getContactType()
    {
        if (null === $this->contact_type) {
            return null;
        }
        $valueSet = DealerContactInfoTableMap::getValueSet(DealerContactInfoTableMap::CONTACT_TYPE);
        if (!isset($valueSet[$this->contact_type])) {
            throw new PropelException('Unknown stored enum key: ' . $this->contact_type);
        }

        return $valueSet[$this->contact_type];
    }