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(PublicInformationPeer::ID, $pks, Criteria::IN); $objs = PublicInformationPeer::doSelect($criteria, $con); } return $objs; }
echo UserGroupPeer::retrieveByPK($this->getContext()->getUser()->getAttribute('group_id', '', 'bo'))->getName(); ?> </h3> <h2 class="titlesubmenu">Tingkat</h2> <h3 class="titletext"><?php echo DepartmentPeer::retrieveByPK($this->getContext()->getUser()->getAttribute('department_id', '', 'bo'))->getName(); ?> </h3> </div> </div> <?php $c = new Criteria(); $dept = $this->getContext()->getUser()->getAttribute('department', null, 'bo'); $c->add(PublicInformationPeer::DEPARTMENT_ID, $dept->getChildRecurs(), Criteria::IN); $c->add(PublicInformationPeer::PUBLISHED, 1, Criteria::IN); $information = PublicInformationPeer::doSelect($c); ?> <div class="home_news"> <h1 class="titlecontent"><?php echo __('PublicInformation'); ?> </h1> <?php if ($this->getContext()->getUser()->getAttribute('group', null, 'bo') == 'root') { $microtime = microtime(); list($msec, $sec) = explode(chr(3), $microtime); $conf = 0; //menampilkan speed load echo 'Speed : ' . round($sec + $msec - $conf['headtime'], 3) . ' / sec'; $time_start = microtime(true); }
public function getPublicInformations($criteria = null, $con = null) { include_once 'lib/model/om/BasePublicInformationPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collPublicInformations === null) { if ($this->isNew()) { $this->collPublicInformations = array(); } else { $criteria->add(PublicInformationPeer::PUBLIC_INFORMATION_CATEGORY_ID, $this->getId()); PublicInformationPeer::addSelectColumns($criteria); $this->collPublicInformations = PublicInformationPeer::doSelect($criteria, $con); } } else { if (!$this->isNew()) { $criteria->add(PublicInformationPeer::PUBLIC_INFORMATION_CATEGORY_ID, $this->getId()); PublicInformationPeer::addSelectColumns($criteria); if (!isset($this->lastPublicInformationCriteria) || !$this->lastPublicInformationCriteria->equals($criteria)) { $this->collPublicInformations = PublicInformationPeer::doSelect($criteria, $con); } } } $this->lastPublicInformationCriteria = $criteria; return $this->collPublicInformations; }