public function registerExtension(AbstractExtension $e)
 {
     $argv = array('extension' => $e);
     $this->getEventManager()->trigger(__METHOD__ . '.pre', $this, $argv);
     $this->extensions[$e->getName()] = $e;
     $this->getEventManager()->trigger(__METHOD__ . '.post', $this, $argv);
     return $this;
 }
 /**
  * Defines the validation group for the provided fieldset
  *
  * @return array
  */
 public function getFieldsetValidationGroup()
 {
     $parentvg = parent::getFieldsetValidationGroup();
     if (empty($parentvg)) {
         $parentvg = array();
         foreach ($this->getFieldset()->getElements() as $element) {
             array_push($parentvg, $element->getName());
         }
         $this->setFieldsetValidationGroup($parentvg);
     }
     return $parentvg;
 }