public function setValues($values, $store) { foreach ($values as $id => $value) { if ($value && !is_numeric($value)) { $this->errors[$id] = sprintf('"%s" is not an integer.', $value); } } parent::setValues($values, $store); }
public function setValues($values, $store) { foreach ($values as $id => $value) { $value = str_replace(',', '.', $value); $values[$id] = $value; if ($value && !is_numeric($value)) { $this->errors[$id] = sprintf('"%s" is not an number.', $value); } } parent::setValues($values, $store); }
public function __construct($map_data, $load = true) { parent::__construct($map_data, 'matrix'); if ($load) { $plannedAlternativeMeasurement = Doctrine::getTable('PlannedAlternativeMeasurement')->findByRoleId($map_data['role_id']); $planned_criterion_ids = array(); $planned_alternative_ids = array(); foreach ($plannedAlternativeMeasurement as $measurement) { $planned_criterion_ids[$measurement->criterion_id] = true; $planned_alternative_ids[$measurement->alternative_id] = true; $this->measurement[$measurement->criterion_id][$measurement->alternative_id] = array($measurement->criterion_id, $measurement->alternative_id); } $this->alternatives = Doctrine::getTable('Alternative')->getPlanned(array_keys($planned_alternative_ids)); $this->criteria = Doctrine::getTable('Criterion')->getPlanned(array_keys($planned_criterion_ids)); } $this->values = sfContext::getInstance()->getUser()->getAttribute('values', array(), $this->namespace); }
public function __construct($map_data, $namespace) { parent::__construct($map_data, $namespace . '/pairwise_comparison', 1); }
public function __construct($map_data, $namespace) { parent::__construct($map_data, $namespace . '/point_scale'); }
public function __construct($map_data, $namespace) { parent::__construct($map_data, $namespace . '/comment'); }
public function __construct($map_data, $namespace) { parent::__construct($map_data, $namespace . '/forced_rating'); }