HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
TbJsonPager.php
Go to the documentation of this file.
1 <?php
10 Yii::import('booster.widgets.TbPager');
11 
19 class TbJsonPager extends TbPager
20 {
24  public $json;
25 
31  public function run()
32  {
33  if (!$this->json) {
34  parent::run();
35  }
36 
37  return $this->createPageButtons();
38  }
39 
54  protected function createPageButton($label, $page, $class, $hidden, $selected)
55  {
56  if ($this->json) {
57  if ($hidden || $selected) {
58  $class .= ' ' . ($hidden ? 'disabled' : 'active');
59  }
60  return array('class' => $class, 'url' => $this->createPageUrl($page), 'text' => $label);
61  }
62  return parent::createPageButton($label, $page, $class, $hidden, $selected);
63  }
64 }