Beispiel #1
0
 public function formatValue($key = null)
 {
     if ($key == null) {
         return '';
     }
     // value is already available (foreign key with no specific constraint in it
     if (isset($this->_enumValues[$key])) {
         return $this->_enumValues[$key];
     }
     // value no more available to select, though we need to display it !
     if (is_string($key)) {
         $uri = new ObjectModel\ObjectUri($key);
         $uri->setClass($this->getCollection()->getClass());
         $_do = clone $this->_collection->getDataObject();
         $_do->setUri($uri);
         Backend::read($_do);
     } else {
         $_do = $key->getDataObject();
     }
     return Property::parseDisplayProperty($_do, $this->getParameter('display'));
 }