本文整理汇总了PHP中Zurmo::app方法的典型用法代码示例。如果您正苦于以下问题:PHP Zurmo::app方法的具体用法?PHP Zurmo::app怎么用?PHP Zurmo::app使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zurmo
的用法示例。
在下文中一共展示了Zurmo::app方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionDelete
public function actionDelete($id)
{
$productCategory = ProductCategory::GetById(intval($id));
$isDeleted = $productCategory->delete();
if ($isDeleted) {
$this->redirect(array($this->getId() . '/index'));
} else {
Yii::app()->user->setFlash('notification', Zurmo::t('ProductTemplatesModule', 'The product category is associated to product templates or has child categories in the system hence could not be deleted'));
$this->redirect(Zurmo::app()->request->getUrlReferrer());
}
}
示例2: actionDelete
public function actionDelete($id)
{
$productTemplate = ProductTemplate::GetById(intval($id));
ControllerSecurityUtil::resolveAccessCanCurrentUserDeleteModel($productTemplate);
//Check if product template has associated products
if ($productTemplate->delete()) {
$this->redirect(array($this->getId() . '/index'));
} else {
Yii::app()->user->setFlash('notification', Zurmo::t('ProductTemplatesModule', 'The product template is associated to products in the system hence could not be deleted'));
$this->redirect(Zurmo::app()->request->getUrlReferrer());
}
}