Exemplo n.º 1
0
 /**
  * removing all the information object
  * 
  * @param InfoEntityAbstract $entity
  * @param InfoTypeAbstract   $type
  * 
  * @return Ambigous <multitype:, multitype:BaseEntityAbstract >
  */
 public static function remove(InfoEntityAbstract $entity, InfoTypeAbstract $type = null)
 {
     $where = StringUtilsAbstract::lcFirst(str_replace('Info', '', get_called_class())) . 'Id = ?';
     $params = array($entity->getId());
     if ($type instanceof InfoTypeAbstract) {
         $where .= ' AND typeId = ?';
         $params[] = $type->getId();
     }
     self::updateByCriteria('active = 0', $where, $params);
 }
Exemplo n.º 2
-2
 /**
  * (non-PHPdoc)
  * @see BaseEntity::__loadDaoMap()
  */
 public function __loadDaoMap()
 {
     DaoMap::begin($this, 'oinfo_type');
     parent::__loadDaoMap();
     DaoMap::commit();
 }