/** * Text representation of applied search fields. * @param object $obj * @return string * @access private */ protected function _restrictions_as_text($obj) { $Result = parent::_restrictions_as_text($obj); $kinds = $this->app->display_options->entry_kinds(); if (sizeof($obj->parameters['kind']) == sizeof($kinds)) { if ($obj->parameters['not_kind']) { $Result[] = '<span class="error">All kinds are removed</span>'; } } else { if (sizeof($obj->parameters['kind']) == 0) { if (!$obj->parameters['not_kind']) { $Result[] = '<span class="error">No kinds are included</span>'; } } else { $param_kinds = $obj->parameters['kind']; foreach ($param_kinds as $kind_id) { $kind_text[] = $kinds[$kind_id]->title; } if ($obj->parameters['not_kind']) { $Result[] = 'Kind is not ' . join(',', $kind_text); } else { $Result[] = 'Kind is ' . join(',', $kind_text); } } } return $Result; }
/** * Text representation of applied search fields. * @param object $obj * @return string * @access private */ protected function _restrictions_as_text($obj) { $Result = parent::_restrictions_as_text($obj); $props = $this->app->display_options->weather_icons(); if (sizeof($obj->parameters['weather_type'])) { foreach ($obj->parameters['weather_type'] as $type) { $weather_types[] = $props[$type]->title; } if ($obj->parameters['not_weather_type']) { $Result[] = 'Weather is not one of ' . join(', ', $weather_types); } else { $Result[] = 'Weather is one of ' . join(', ', $weather_types); } } return $Result; }