public function __construct(Xhb $xhb, $data = array())
 {
     $this->setLabel('Category');
     parent::__construct($data);
     $this->_xhb = $xhb;
     $options = array();
     foreach ($xhb->getCategoryCollection() as $key => $category) {
         $options[$key] = $this->_categoryToOptionArray($category);
     }
     $this->setOptions($options);
 }
Exemple #2
0
 public function __construct(Xhb $xhb, $data = array())
 {
     $this->setLabel('Range');
     parent::__construct($data);
     $this->_xhb = $xhb;
     $i18n = I18n::instance();
     $periods = AccountOperation::getStaticCollectionFilters()['period'];
     $options = array();
     foreach ($periods['values'] as $k => $p) {
         $options[$k] = array('label' => $i18n->tr($p));
     }
     $this->setOptions($options);
 }