/** * Updates published state by their associated ids * * @param array $pair * @return boolean */ public function updatePublished(array $pair) { foreach ($pair as $id => $published) { if (!$this->productMapper->updatePublishedById($id, $published)) { return false; } } return true; }