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


PHP EmailTemplate::delete方法代码示例

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


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

示例1: action

 public function action()
 {
     $checked = @array_keys($_POST['items']);
     if (is_array($checked) && !empty($checked)) {
         if ($_POST['with-selected'] == 'delete') {
             foreach ($checked as $id) {
                 EmailTemplate::delete($id);
             }
         }
     }
     redirect(extension_members::baseURL() . 'email_templates/');
 }
开发者ID:klaftertief,项目名称:members-legacy,代码行数:12,代码来源:content.email_templates.php

示例2: action

 public function action()
 {
     $email_template_id = $this->_context[0];
     $fields = $_POST['fields'];
     if (isset($_POST['action']['delete'])) {
         EmailTemplate::delete($email_template_id);
         redirect(extension_members::baseURL() . 'email_templates/');
     } elseif (isset($_POST['action']['save'])) {
         $et = EmailTemplate::loadFromID($email_template_id);
         $et->removeAllRoles();
         $et->subject = $fields['subject'];
         $et->type = $fields['type'];
         $et->body = $fields['body'];
         if (isset($fields['roles']) && strlen(trim($fields['roles'])) > 0) {
             $roles = preg_split('/\\s*,\\s*/i', $fields['roles'], -1, PREG_SPLIT_NO_EMPTY);
             foreach ($roles as $r) {
                 $et->addRoleFromName($r);
             }
         }
         EmailTemplate::save($et);
         redirect(extension_members::baseURL() . 'email_templates_edit/' . $et->id . '/saved/');
     }
 }
开发者ID:ErisDS,项目名称:Bugaroo,代码行数:23,代码来源:content.email_templates_edit.php

示例3: array

     $ajaxResult = array();
     if ($template_id == $id_to_show_if_new) {
         $obj->create($name, $info, $info_technical, $default_languages_id);
         $ajaxResult['id'] = is_null($obj->id) ? '0' : $obj->id;
         $ajaxResult['action'] = $id_to_show_if_new;
     } else {
         $obj->update($name, $info, $info_technical, $default_languages_id);
         $ajaxResult['id'] = $template_id;
         $ajaxResult['action'] = 'UPDATED';
     }
     echo ajaxReturn($ajaxResult);
     exit;
 } elseif ($_POST['me_action'] == 'DELETEDATA') {
     $template_id = tep_db_prepare_input($_POST['template_id']);
     if ($template_id != $id_to_show_if_new && $template_id == $obj->id) {
         $obj->delete();
     }
     echo is_null($obj->id) ? '1' : '0';
     exit;
 } elseif ($_POST['me_action'] == 'ADDLANGUAGE') {
     $languages_id = tep_db_prepare_input($_POST['languages_id']);
     $obj->addContent($languages_id);
     exit;
 } elseif ($_POST['me_action'] == 'DELETELANGUAGE') {
     $languages_id = tep_db_prepare_input($_POST['languages_id']);
     $obj->deleteContent($languages_id);
     exit;
 } elseif ($_POST['me_action'] == 'SAVELANGUAGE') {
     $languages_id = tep_db_prepare_input($_POST['languages_id']);
     $email_subject = tep_db_prepare_input($_POST['email_subject']);
     $email_content = tep_db_prepare_input($_POST['email_content']);
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:email-template-detail.php


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