Changeset 5979
- Timestamp:
- 01/25/12 05:43:41 (4 months ago)
- File:
-
- 1 edited
-
trunk/core/modulecontroller.core.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/modulecontroller.core.php
r5922 r5979 119 119 120 120 /** 121 * Proxy/Convenience Getter Method for the current Repository 122 * 123 * @param string $entityName 121 * Proxy/Convenience Getter Method for the Repository of the current Module. 122 * 123 * 124 * @param string $entityName Name of an Entity, like "\Entities\User". 124 125 * @return Doctrine\ORM\EntityRepository 125 126 */ … … 130 131 $entityName = $this->getEntityNameFromClassname(); 131 132 } 132 #Clansuite_Debug::firebug($entityName); 133 133 134 return $this->doctrine_em->getRepository($entityName); 134 135 } … … 139 140 * Flush (save all) 140 141 * 141 * @param object $model Entit es/xy142 * @param object $model Entity. 142 143 * @param boolean $flush Uses flush on true, save on false. Defaults to flush (true). 143 144 */ 144 public function saveModel($model, $flush = true) 145 { 146 $em = $this->doctrine_em; 147 $em->persist($model); 145 public function saveModel(\Doctrine\ORM\Mapping\Entity $model, $flush = true) 146 { 147 $this->doctrine_em->persist($model); 148 148 149 149 if($flush === true) 150 150 { 151 $ em->flush();151 $this->doctrine_em->flush(); 152 152 } 153 153 else 154 154 { 155 $ em->save();155 $this->doctrine_em->save(); 156 156 } 157 157 }
Note: See TracChangeset
for help on using the changeset viewer.
