controller/frontend/src/Controller/Frontend/Customer/Standard.php
public function add( array $values )
	{
		$item = $this->item->fromArray( $values );
		$addrItem = $item->getPaymentAddress();

		if( $item->getLabel() === '' )
		{
			$label = $addrItem->getLastname();

			if( ( $firstName = $addrItem->getFirstname() ) !== '' ) {
				$label = $firstName . ' ' . $label;
			}

			if( ( $company = $addrItem->getCompany() ) !== '' ) {
				$label .= ' (' . $company . ')';
			}

			$item = $item->setLabel( $label );
		}

		if( $item->getCode() === '' ) {
			$item = $item->setCode( $addrItem->getEmail() );
		}

		$this->item = $item;
		return $this;
	}
public function add( array $values )
	{
		$item = $this->item->fromArray( $values );
		$addrItem = $item->getPaymentAddress();

		if( $item->getLabel() === '' )
		{
			$label = $addrItem->getLastname();

			if( ( $firstName = $addrItem->getFirstname() ) !== '' ) {
				$label = $firstName . ' ' . $label;
			}

			if( ( $company = $addrItem->getCompany() ) !== '' ) {
				$label .= ' (' . $company . ')';
			}

			$item = $item->setLabel( $label );
		}

		if( $item->getCode() === '' ) {
			$item = $item->setCode( $addrItem->getEmail() );
		}

		$this->item = $item;
		return $this;
	}
public function add ( array $ values ) { $ item = $ this -> item -> fromArray ( $ values ) ; $ addrItem = $ item -> getPaymentAddress ( ) ; if ( $ item -> getLabel ( ) === '' ) { $ label = $ addrItem -> getLastname ( ) ; if ( ( $ firstName = $ addrItem -> getFirstname ( ) ) !== '' ) { $ label = $ firstName . ' ' . $ label ; } if ( ( $ company = $ addrItem -> getCompany ( ) ) !== '' ) { $ label .= ' (' . $ company . ')' ; } $ item = $ item -> setLabel ( $ label ) ; } if ( $ item -> getCode ( ) === '' ) { $ item = $ item -> setCode ( $ addrItem -> getEmail ( ) ) ; } $ this -> item = $ item ; return $ this ; }
Creates a new customer item object pre-filled with the given values but not yet stored

@param array $values Values added to the customer item (new or existing) like "customer.code"
@return \Aimeos\Controller\Frontend\Customer\Iface Customer controller for fluent interface
@since 2019.04
Creates a new customer item object pre - filled with the given values but not yet stored