/**
  * @param ModelInterface $model
  *
  * @return mixed
  */
 public function getValue(ModelInterface $model)
 {
     $value = parent::getValue($model);
     if (!$value) {
         return;
     }
     return $value->getHash();
 }
 /**
  * @param ModelInterface $model
  *
  * @return mixed
  */
 public function getValue(ModelInterface $model)
 {
     $references = parent::getValue($model);
     $result = array();
     foreach ($references as $key => $reference) {
         $result[$key] = array('hash' => $reference->getHash(), 'class' => $reference->getClass());
     }
     return $result;
 }
 /**
  * @param ModelInterface $model
  *
  * @return mixed
  */
 public function getValue(ModelInterface $model)
 {
     $value = parent::getValue($model);
     return $value->getUsername();
 }