public function getIPv6Address()
 {
     $this->__load();
     return parent::getIPv6Address();
 }
 /**
  * @param IXP_Form_Interface_Vlan $form The form object
  * @param \Entities\VlanInterface $object The Doctrine2 entity (being edited or blank for add)
  * @param bool $isEdit True of we are editing an object, false otherwise
  * @param array $options Options passed onto Zend_Form
  * @param string $cancelLocation Where to redirect to if 'Cancal' is clicked
  * @return void
  */
 protected function formPostProcess($form, $object, $isEdit, $options = null, $cancelLocation = null)
 {
     if ($isEdit) {
         $form->getElement('virtualinterfaceid')->setValue($object->getVirtualInterface()->getId());
         $form->getElement('preselectCustomer')->setValue($object->getVirtualInterface()->getCustomer()->getId());
         $form->getElement('vlanid')->setValue($object->getVlan()->getId());
         $form->getElement('preselectIPv4Address')->setValue($object->getIPv4Address() ? $object->getIPv4Address()->getAddress() : null);
         $form->getElement('preselectIPv6Address')->setValue($object->getIPv6Address() ? $object->getIPv6Address()->getAddress() : null);
         $form->getElement('preselectVlanInterface')->setValue($object->getId());
         if ($this->getParam('rtn', false) == 'vli') {
             $form->setAction(OSS_Utils::genUrl('vlan-interface', 'edit', false, ['id' => $object->getId(), 'rtn' => 'vli']));
         } else {
             $form->getElement('cancel')->setAttrib('href', OSS_Utils::genUrl('virtual-interface', 'edit', false, ['id' => $object->getVirtualInterface()->getId()]));
         }
     } else {
         if ($this->getRequest()->isPost() && ($vintid = isset($_POST['virtualinterfaceid']) && $_POST['virtualinterfaceid'])) {
             $vint = $this->getD2EM()->getRepository('\\Entities\\VirtualInterface')->find($_POST['virtualinterfaceid']);
         } else {
             if (($vintid = $this->getRequest()->getParam('vintid')) !== null) {
                 $vint = $this->getD2EM()->getRepository('\\Entities\\VirtualInterface')->find($vintid);
             }
         }
         if (!isset($vint) || !$vint) {
             $this->addMessage('You need a containing virtual interface before you add a VLAN interface', OSS_Message::ERROR);
             $this->redirect('virtual-interface/add');
         }
         // make BGP MD5 easy
         $form->getElement('ipv4bgpmd5secret')->setValue(OSS_String::random());
         $form->getElement('ipv6bgpmd5secret')->setValue($form->getElement('ipv4bgpmd5secret')->getValue());
         $form->getElement('maxbgpprefix')->setValue($vint->getCustomer()->getMaxprefixes());
         $form->getElement('virtualinterfaceid')->setValue($vint->getId());
         $form->getElement('preselectCustomer')->setValue($vint->getCustomer()->getId());
         $form->getElement('cancel')->setAttrib('href', OSS_Utils::genUrl('virtual-interface', 'edit', false, ['id' => $vint->getId()]));
     }
 }