private function handlePeople($type, $names) { foreach (explode(";", $names) as $name) { $people = new StagingPeople(); $people->setPeopleType($type); $people->setFormatedName($name); $this->object->handleRelation($people, $this->staging); } }
public function loadEmbedWrongOperator($people) { if ($this->isBound()) { return; } $subForm = new sfForm(); $this->embedForm('WrongOperator', $subForm); foreach ($people as $key => $vals) { $val = new StagingPeople(); $val->fromArray($vals); $form = new PeopleInErrorForm($val); $this->embeddedForms['WrongOperator']->embedForm($key, $form); } //Re-embedding the container $this->embedForm('WrongOperator', $this->embeddedForms['WrongOperator']); }