public function viewAction()
    {
        $this->checkAuth();

        /** @var Customer $customer */
        $customer   = $this->getSecurityContext()->getCustomerUser();
        $newsletter = NewsletterQuery::create()->findOneByEmail($customer->getEmail());
        $data       = array(
            'id'            => $customer->getId(),
            'title'         => $customer->getTitleId(),
            'firstname'     => $customer->getFirstName(),
            'lastname'      => $customer->getLastName(),
            'email'         => $customer->getEmail(),
            'email_confirm' => $customer->getEmail(),
            'lang_id'       => $customer->getLangId(),
            'newsletter'    => $newsletter instanceof Newsletter ? !$newsletter->getUnsubscribed() : false,
        );

        $customerProfileUpdateForm = $this->createForm(FrontForm::CUSTOMER_PROFILE_UPDATE, 'form', $data);

        // Pass it to the parser
        $this->getParserContext()->addForm($customerProfileUpdateForm);
    }
public function viewAction()
    {
        $this->checkAuth();

        /** @var Customer $customer */
        $customer   = $this->getSecurityContext()->getCustomerUser();
        $newsletter = NewsletterQuery::create()->findOneByEmail($customer->getEmail());
        $data       = array(
            'id'            => $customer->getId(),
            'title'         => $customer->getTitleId(),
            'firstname'     => $customer->getFirstName(),
            'lastname'      => $customer->getLastName(),
            'email'         => $customer->getEmail(),
            'email_confirm' => $customer->getEmail(),
            'lang_id'       => $customer->getLangId(),
            'newsletter'    => $newsletter instanceof Newsletter ? !$newsletter->getUnsubscribed() : false,
        );

        $customerProfileUpdateForm = $this->createForm(FrontForm::CUSTOMER_PROFILE_UPDATE, 'form', $data);

        // Pass it to the parser
        $this->getParserContext()->addForm($customerProfileUpdateForm);
    }
public function viewAction ( ) { $ this -> checkAuth ( ) ; /** @var Customer $customer */ $ customer = $ this -> getSecurityContext ( ) -> getCustomerUser ( ) ; $ newsletter = NewsletterQuery :: create ( ) -> findOneByEmail ( $ customer -> getEmail ( ) ) ; $ data = array ( 'id' => $ customer -> getId ( ) , 'title' => $ customer -> getTitleId ( ) , 'firstname' => $ customer -> getFirstName ( ) , 'lastname' => $ customer -> getLastName ( ) , 'email' => $ customer -> getEmail ( ) , 'email_confirm' => $ customer -> getEmail ( ) , 'lang_id' => $ customer -> getLangId ( ) , 'newsletter' => $ newsletter instanceof Newsletter ? ! $ newsletter -> getUnsubscribed ( ) : false , ) ; $ customerProfileUpdateForm = $ this -> createForm ( FrontForm :: CUSTOMER_PROFILE_UPDATE , 'form' , $ data ) ; // Pass it to the parser $ this -> getParserContext ( ) -> addForm ( $ customerProfileUpdateForm ) ; }
Prepare customer data update.
Prepare customer data update .