예제 #1
0
파일: ARepo.php 프로젝트: kirkbauer2/kirkxc
 /**
  * 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);
 }