public function source($options) { foreach ($options as $key => $label) { if (is_object($label)) { $key = $label->getKey(); $label = $label->getValue(); } $option = new Option(); foreach ($this->pushSave as $name => $value) { $option->push($name, $value); } $option->setValue($key); $option->setLabel($label); $this->parent->addOption($option, $this->position); } }