#echo $copies->getTotalCatalog() ; echo link_to_remote($copies->getTotalCatalog(), array('url' => 'rpt_acreditation/listCollection?filters[published_year]=' . $v_material_collection->getPublishedYear() . '&filters[cat_category_id]=' . $v_material_collection->getCatCategoryId() . '&total_catalog=' . $filters['TOTAL_CATALOG'], 'update' => 'content', 'script' => 'true', 'loading' => "showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white', 'title' => __('Collection'))); } else { echo "-"; } ?> <?php } else { ?> <?php if ($v_material_collection->getTotalColItem() != null) { $c = new Criteria(); $c->add(VMaterialCatalogPeer::CAT_CATEGORY_ID, $v_material_collection->getCatCategoryId()); $c->add(VMaterialCatalogPeer::PUBLISHED_YEAR, $v_material_collection->getPublishedYear()); $copies = VMaterialCatalogPeer::doSelectOne($c); #echo $copies->getTotalCatalog() ; echo link_to_remote($copies->getTotalCatalog(), array('url' => 'rpt_acreditation/listCollection?filters[published_year]=' . $v_material_collection->getPublishedYear() . '&filters[cat_category_id]=' . $v_material_collection->getCatCategoryId(), 'update' => 'content', 'script' => 'true', 'loading' => "showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white', 'title' => __('Collection'))); } else { echo "-"; } ?> <?php } ?> </td> </tr> <?php }
public function filterMaterial($c, $filters) { $filters_key = array_keys($filters); foreach ($filters_key as $key) { $value = $filters[$key]; if ($value == '' || $value == null) { continue; } if ($key == 'TOTAL_CATALOG') { $c->add(VMaterialCatalogPeer::CAT_CATEGORY_ID, VMaterialCollectionPeer::CAT_CATEGORY_ID); #$c->add(VMaterialCatalogPeer::PUBLISHED_YEAR, VMaterialCollectionPeer::PUBLISHED_YEAR); $column = VMaterialCatalogPeer::getTableMap()->getColumn('TOTAL_CATALOG'); } else { $column = VMaterialCollectionPeer::getTableMap()->getColumn($key); } $name = $column->getFullyQualifiedName(); $creoleType = $column->getCreoleType(); if ($creoleType == CreoleTypes::TIMESTAMP) { $from = $value['from']; $to = $value['to']; if ($from != '' && $from != null) { $c->add($name, $from, Criteria::GREATER_EQUAL); } if ($to != '' && $to != null) { $c->add($name, $to, Criteria::LESS_EQUAL); } } else { if ($creoleType == CreoleTypes::INTEGER || $creoleType == CreoleTypes::BIGINT) { $c->add($name, $value, Criteria::EQUAL); } else { if ($creoleType == CreoleTypes::VARCHAR) { $c->add($name, "%{$value}%", Criteria::LIKE); } else { if ($creoleType == CreoleTypes::NUMERIC) { $c->add($name, $value, Criteria::EQUAL); } } } } } }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VMaterialCatalogPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setCatCategoryId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setPublishedYear($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setTotalCatalog($arr[$keys[2]]); } }
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(VMaterialCatalogPeer::CAT_CATEGORY_ID, $pks, Criteria::IN); $objs = VMaterialCatalogPeer::doSelect($criteria, $con); } return $objs; }