コード例 #1
0
}
Debug::Arr($ids, 'Selected Objects', __FILE__, __LINE__, __METHOD__, 10);
$action = Misc::findSubmitButton();
switch ($action) {
    case 'add':
        Redirect::Page(URLBuilder::getURL(NULL, 'EditPremiumPolicy.php', FALSE));
        break;
    case 'delete' or 'undelete':
        if (strtolower($action) == 'delete') {
            $delete = TRUE;
        } else {
            $delete = FALSE;
        }
        $pplf = new PremiumPolicyListFactory();
        foreach ($ids as $id) {
            $pplf->getByIdAndCompanyId($id, $current_company->getId());
            foreach ($pplf as $pp_obj) {
                $pp_obj->setDeleted($delete);
                if ($pp_obj->isValid()) {
                    $pp_obj->Save();
                }
            }
        }
        Redirect::Page(URLBuilder::getURL(NULL, 'PremiumPolicyList.php'));
        break;
    default:
        BreadCrumb::setCrumb($title);
        $pplf = new PremiumPolicyListFactory();
        $pplf->getByCompanyId($current_company->getId());
        $pager = new Pager($pplf);
        $type_options = $pplf->getOptions('type');