setNumber() public méthode

Set number.
public setNumber ( string $number ) : Sulu\Bundle\ContactBundle\Entity\AccountInterface
$number string
Résultat Sulu\Bundle\ContactBundle\Entity\AccountInterface
Exemple #1
0
 /**
  * Process geiven entity for patch.
  *
  * @param AccountInterface $account
  * @param Request $request
  * @param ObjectManager $entityManager
  */
 protected function doPatch(AccountInterface $account, Request $request, ObjectManager $entityManager)
 {
     $accountManager = $this->getAccountManager();
     if ($request->get('uid') !== null) {
         $account->setUid($request->get('uid'));
     }
     if ($request->get('registerNumber') !== null) {
         $account->setRegisterNumber($request->get('registerNumber'));
     }
     if ($request->get('number') !== null) {
         $account->setNumber($request->get('number'));
     }
     if ($request->get('placeOfJurisdiction') !== null) {
         $account->setPlaceOfJurisdiction($request->get('placeOfJurisdiction'));
     }
     if (array_key_exists('id', $request->get('logo', []))) {
         $accountManager->setLogo($account, $request->get('logo')['id']);
     }
     if ($request->get('medias') !== null) {
         $accountManager->setMedias($account, $request->get('medias'));
     }
     // Check if mainContact is set
     if (($mainContactRequest = $request->get('mainContact')) !== null) {
         $mainContact = $entityManager->getRepository($this->container->getParameter('sulu.model.contact.class'))->find($mainContactRequest['id']);
         if ($mainContact) {
             $account->setMainContact($mainContact);
         }
     }
     // Process details
     if ($request->get('bankAccounts') !== null) {
         $accountManager->processBankAccounts($account, $request->get('bankAccounts', []));
     }
 }