public function getType() { $type_id = waRequest::post('type_id', null, waRequest::TYPE_INT); if (!$type_id) { return null; } else { $types = shopTypeModel::extractAllowed(array($type_id)); if (!$types) { return null; } else { return $type_id; } } }