/**
  * {@inheritdoc}
  */
 public function preparePrototype(ObjectPrototypeState $prototypeState, $prototype)
 {
     $activityPrototypes = array();
     foreach ($prototype->getActivityPrototypes() as $activityPrototype) {
         $activityPrototypes[] = $activityPrototype->getName();
     }
     $prototypeState->addExtra('allowDrug', $prototype->getAllowDrug())->addExtra('drugGroup', $prototype->getDrugGroup() ? $prototype->getDrugGroup()->getName() : null)->addExtra('activityPrototypes', $activityPrototypes);
     return parent::preparePrototype($prototypeState, $prototype);
 }
 /**
  * {@inheritdoc}
  */
 public function preparePrototype(ObjectPrototypeState $prototypeState, $prototype)
 {
     $prototypeState->addExtra('allowDrug', $prototype->getAllowDrug())->addExtra('drugGroup', $prototype->getDrugGroup() ? $prototype->getDrugGroup()->getName() : null);
     return parent::preparePrototype($prototypeState, $prototype);
 }