Skip to content

Instantly share code, notes, and snippets.

@davidwindell
Created July 26, 2012 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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