当前位置: 首页>>代码示例>>PHP>>正文


PHP Canvas::doActions方法代码示例

本文整理汇总了PHP中Canvas::doActions方法的典型用法代码示例。如果您正苦于以下问题:PHP Canvas::doActions方法的具体用法?PHP Canvas::doActions怎么用?PHP Canvas::doActions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Canvas的用法示例。


在下文中一共展示了Canvas::doActions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: header

                        if ($action=='add')    $action='create';
                        if ($action=='update') $action='edit';
                    }
                    else $reshook+=$resaction;
                }
            }
        }
    }
}

// ---------- start deprecated. Use hook to hook actions.
// If canvas actions are defined, because on url, or because contact was created with canvas feature on, we use the canvas feature.
// If canvas actions are not defined, we use standard feature.
if (method_exists($objcanvas->control,'doActions'))
{
    $objcanvas->doActions($id);
    if (! empty($objcanvas->error) || (! empty($objcanvas->errors) && sizeof($objcanvas->errors) > 0))
    {
        $error=$objcanvas->error; $errors=$objcanvas->errors;
        if ($action=='add')    { $objcanvas->action='create'; $action='create'; }
        if ($action=='update') { $objcanvas->action='edit';   $action='edit'; }
    }
}
// ---------- end deprecated.

if (empty($reshook))
{
    // Cancel
    if (GETPOST("cancel") && GETPOST('backtopage'))
    {
        header("Location: ".GETPOST('backtopage'));
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:fiche.php

示例2:

                    else
                    {
                        $reshook+=$resaction;
                    }
                }
            }
        }
    }
}

// ---------- start deprecated. Use hook to hook actions.
// If canvas actions are defined, because on url, or because contact was created with canvas feature on, we use the canvas feature.
// If canvas actions are not defined, we use standard feature.
if (method_exists($objcanvas->control,'doActions'))
{
    $objcanvas->doActions($socid);

    if (! empty($objcanvas->error) || (! empty($objcanvas->errors) && sizeof($objcanvas->errors) > 0))
    {
        $error=$objcanvas->error; $errors=$objcanvas->errors;
        if ($action=='add')    { $objcanvas->action='create'; $action='create'; }
        if ($action=='update') { $objcanvas->action='edit';   $action='edit'; }
    }
}
// ---------- end deprecated.

if (empty($reshook))
{
    if ($_POST["getcustomercode"])
    {
        // We defined value code_client
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:soc.php


注:本文中的Canvas::doActions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。