public function deleteSelection($attachments) { $return = 1; foreach ($attachments as $attachment_id) { $attachment = new JeproshopAttachmentModelAttachment((int) $attachment_id); $return &= $attachment->delete(); } return $return; }