Ejemplo n.º 1
0
 /**
  * Update single entity
  *
  * @param \XLite\Model\AEntity $entity Entity to use
  * @param array                $data   Data to save OPTIONAL
  *
  * @return void
  */
 protected function performUpdate(\XLite\Model\AEntity $entity, array $data = array())
 {
     $entity->map($data);
     // Since Doctrine lifecycle callbacks do not allow
     // to modify associations, we've added this method
     $entity->prepareEntityBeforeCommit($entity::ACTION_UPDATE);
 }