$this->conds->addChild($ufb->getUFC());
}
- public function &get(PlLimit $limit = null, $orders = array())
+ protected function &getFilterResults(PlFilter &$pf, PlLimit $limit)
{
- $orders = array_merge($orders, $this->orders);
-
- $uf = $this->buildFilter($this->conds, $orders);
- if (is_null($limit)) {
- $limit = new PlLimit(20, 0);
- }
- $it = $uf->getProfiles($limit);
- $this->count = $uf->getTotalCount();
- return $it;
+ $profiles = $pf->getProfiles($limit, Profile::FETCH_MINIFICHES);
+ return $profiles;
}
}
-class ArraySet extends UserSet
+class ArraySet extends ProfileSet
{
public function __construct(array $users)
{
}
return null;
}
+
+ public function bounds()
+ {
+ $order = Env::v('order', $this->defaultkey);
+ $show_bounds = 0;
+ if (($order == "name") || ($order == "-name")) {
+ $this->bound_field = "name";
+ $show_bounds = 1;
+ } elseif (($order == "promo") || ($order == "-promo")) {
+ $this->bound_field = "promo";
+ $show_bounds = -1;
+ }
+ if ($order{0} == '-') {
+ $show_bounds = -$show_bounds;
+ }
+ return $show_bounds;
+ }
}
class MinificheView extends ProfileView
parent::__construct($set, $data, $params);
}
- public function bounds()
- {
- $order = Env::v('order', $this->defaultkey);
- $show_bounds = 0;
- if (($order == "name") || ($order == "-name")) {
- $this->bound_field = "name";
- $show_bounds = 1;
- } elseif (($order == "promo") || ($order == "-promo")) {
- $this->bound_field = "promo";
- $show_bounds = -1;
- }
- if ($order{0} == '-') {
- $show_bounds = -$show_bounds;
- }
- return $show_bounds;
- }
-
public function templateName()
{
return 'include/plview.minifiche.tpl';
parent::__construct($set, $data, $params);
}
- public function bounds()
- {
- $order = Env::v('order', $this->defaultkey);
- $show_bounds = 0;
- if (($order == "name") || ($order == "-name")) {
- $this->bound_field = "nom";
- $show_bounds = 1;
- } elseif (($order == "promo") || ($order == "-promo")) {
- $this->bound_field = "promo";
- $show_bounds = -1;
- }
- if ($order{0} == '-') {
- $show_bounds = -$show_bounds;
- }
- return $show_bounds;
- }
-
public function templateName()
{
return 'include/plview.referent.tpl';
public function __construct(PlSet &$set, $data, array $params)
{
$this->entriesPerPage = 24;
+ $this->defaultkey = 'name';
if (@$params['with_score']) {
$this->addSort(new PlViewOrder('score', array(
new UFO_Score(true),
new UFO_Name(Profile::DN_SORT),
), 'pertinence'));
}
+ $set->addCond(new UFC_Photo());
$this->addSort(new PlViewOrder('name', array(new UFO_Name(Profile::DN_SORT)), 'nom'));
$this->addSort(new PlViewOrder('promo', array(
new UFO_Promo(UserFilter::DISPLAY, true),
parent::__construct($set, $data, $params);
}
- public function bounds()
- {
- $order = Env::v('order', $this->defaultkey);
- $show_bounds = 0;
- if (($order == "name") || ($order == "-name")) {
- $this->bound_field = "nom";
- $show_bounds = 1;
- } elseif (($order == "promo") || ($order == "-promo")) {
- $this->bound_field = "promo";
- $show_bounds = -1;
- }
- if ($order{0} == '-') {
- $show_bounds = -$show_bounds;
- }
- return $show_bounds;
- }
-
public function templateName()
{
return 'include/plview.trombi.tpl';