public function fillData($entity,
        ArrayHash $values)
    {
        $properties = $this->getEntityProperties($entity);
        foreach ($properties as $property) {
            if (array_key_exists($property, $values)) {
                // You may want to process Collection property elsewhere
                if (!$entity->$property instanceof Collection) {
                    $entity->$property = $values->$property;
                }
            }
        }
        $entity->modifiedOn = new DateTime();
        return $entity;
    }
public function fillData($entity,
        ArrayHash $values)
    {
        $properties = $this->getEntityProperties($entity);
        foreach ($properties as $property) {
            if (array_key_exists($property, $values)) {
                // You may want to process Collection property elsewhere
                if (!$entity->$property instanceof Collection) {
                    $entity->$property = $values->$property;
                }
            }
        }
        $entity->modifiedOn = new DateTime();
        return $entity;
    }
public function fillData ( $ entity , ArrayHash $ values ) { $ properties = $ this -> getEntityProperties ( $ entity ) ; foreach ( $ properties as $ property ) { if ( array_key_exists ( $ property , $ values ) ) { // You may want to process Collection property elsewhere if ( ! $ entity -> $ property instanceof Collection ) { $ entity -> $ property = $ values -> $ property ; } } } $ entity -> modifiedOn = new DateTime ( ) ; return $ entity ; }
Fills entity with set data from form
@param type $entity
@param ArrayHash $values
@return $entity
Fills entity with set data from form