Skip to content

Instantly share code, notes, and snippets.

@manuakasam
Forked from davidwindell/gist:3181965
Created July 26, 2012 14:26
Show Gist options
  • Save manuakasam/3182360 to your computer and use it in GitHub Desktop.
Save manuakasam/3182360 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