コード例 #1
0
ファイル: BaseCatalog.php プロジェクト: taryono/school
 public function getColItems($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseColItemPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collColItems === null) {
         if ($this->isNew()) {
             $this->collColItems = array();
         } else {
             $criteria->add(ColItemPeer::CATALOG_ID, $this->getId());
             ColItemPeer::addSelectColumns($criteria);
             $this->collColItems = ColItemPeer::doSelect($criteria, $con);
         }
     } else {
         if (!$this->isNew()) {
             $criteria->add(ColItemPeer::CATALOG_ID, $this->getId());
             ColItemPeer::addSelectColumns($criteria);
             if (!isset($this->lastColItemCriteria) || !$this->lastColItemCriteria->equals($criteria)) {
                 $this->collColItems = ColItemPeer::doSelect($criteria, $con);
             }
         }
     }
     $this->lastColItemCriteria = $criteria;
     return $this->collColItems;
 }
コード例 #2
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executePrintLabel()
 {
     $c = new Criteria();
     $c->add(TempTablePeer::EMPLOYEE_ID, 1112);
     $c->addJoin(ColItemPeer::ID, TempTablePeer::COUNSELING_ID);
     $c->addDescendingOrderByColumn(ColItemPeer::ID);
     $col_items = ColItemPeer::doSelect($c);
     $total = ColItemPeer::doCount($c);
     $this->forward404Unless($col_items);
     $this->col_items = $col_items;
     $this->total = $total;
     $this->orientation = 'landscape';
     $this->papersize = 'label';
     $this->setViewClass('sfDomPDF');
 }
コード例 #3
0
ファイル: BaseColItemPeer.php プロジェクト: taryono/school
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(ColItemPeer::ID, $pks, Criteria::IN);
         $objs = ColItemPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
コード例 #4
0
ファイル: ColItemPeer.php プロジェクト: taryono/school
 public static function doSelectFiltered(Criteria $criteria, $con = null)
 {
     return ColItemPeer::doSelect($criteria);
 }
コード例 #5
0
ファイル: actions.class_.php プロジェクト: taryono/school
 public function executeGetItem()
 {
     $id = $this->getRequestParameter('id');
     $this->forward404Unless($id);
     $c = new Criteria();
     $c->add(ColItemPeer::CATALOG_ID, $id);
     $c->addAscendingOrderByColumn(ColItemPeer::INDEX_NO);
     $this->rows = ColItemPeer::doSelect($c);
 }
コード例 #6
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeGetChild()
 {
     $id = $this->getRequestParameter('id');
     $this->forward404Unless($id);
     $level = $this->getRequestParameter('level');
     if ($level == null) {
         $level = 0;
     }
     $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
     $c = new Criteria();
     $c->add(JobPeer::CODE, $this->getModuleName());
     $job = JobPeer::doSelectOne($c);
     $acl = AclPeer::retrieveByPK($group_id, $job->getId());
     $this->can_add = $acl->getAddPriv() == 1;
     $this->can_edit = $acl->getEditPriv() == 1;
     $this->can_remove = $acl->getRemovePriv() == 1;
     $c = new Criteria();
     $c->add(ColItemPeer::CATALOG_ID, $id);
     $c->addDescendingOrderByColumn(ColItemPeer::ID);
     $this->rows = ColItemPeer::doSelect($c);
     $this->level = $level + 1;
     $this->parent_id = $id;
     $this->parent_class = $this->getRequestParameter('parent_class');
 }