Пример #1
0
 /**
  * Translate
  * 
  * Translates a user value
  * into a real value
  * 
  * @access	public
  * @param	Spark\Grid_Column_Filter	Filter
  * @return	Spark\Grid_Column_Filter_Interface
  */
 public function translate(\Grid_Column_Filter $filter)
 {
     // We don't need to manipulate anything
     $filter->set_real_value($filter->get_user_value());
     return $this;
 }
Пример #2
0
 /**
  * Get Filter
  * 
  * Gets the filter for the grid
  * 
  * @access	public
  * @return	Spark\Grid_Column_Filter_Abstract
  */
 public function get_filter()
 {
     // Lazy load the filter
     if (!$this->_filter) {
         // The filter is it's own object, that way it can store
         // the original values and rendered values etc all in
         // it's own little space
         $this->_filter = \Grid_Column_Filter::factory()->set_grid($this->get_grid())->set_column($this)->set_data('type', $this->get_data('type'))->set_data('filter', $this->get_data('filter'));
     }
     return $this->_filter;
 }