Skip to content

Instantly share code, notes, and snippets.

@davidwindell
Created July 26, 2012 13:12
Show Gist options
  • Save davidwindell/3181965 to your computer and use it in GitHub Desktop.
Save davidwindell/3181965 to your computer and use it in GitHub Desktop.
ZF2 Select Element bound to Object
<?php
namespace My\Form\Element;
use Zend\Form\Element\Select as SelectElement;
class DepartmentSelect extends SelectElement
{
public function getValue()
{
$value = parent::getValue();
return $value->getDepartmentid();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment