當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Model::deleteExtraById方法代碼示例

本文整理匯總了PHP中Backend\Core\Engine\Model::deleteExtraById方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model::deleteExtraById方法的具體用法?PHP Model::deleteExtraById怎麽用?PHP Model::deleteExtraById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Backend\Core\Engine\Model的用法示例。


在下文中一共展示了Model::deleteExtraById方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: delete

 /**
  * Delete a certain user
  *
  * @param int $id
  */
 public static function delete($id)
 {
     $record = self::get($id);
     // delete extra
     BackendModel::deleteExtraById($record['extra_id'], true);
     // delete user id
     BackendModel::get('database')->delete('instagram_users', 'id = ?', (int) $id);
 }
開發者ID:jeroendesloovere,項目名稱:fork-cms-module-instagram,代碼行數:13,代碼來源:Model.php

示例2: delete

 /**
  * Delete an item
  *
  * @param int $id The id of the record to delete.
  */
 public static function delete($id)
 {
     // get db
     $db = BackendModel::getContainer()->get('database');
     // get item
     $item = self::get($id);
     BackendModel::deleteExtraById($item['extra_id']);
     // delete location and its settings
     $db->delete('location', 'id = ? AND language = ?', array((int) $id, BL::getWorkingLanguage()));
     $db->delete('location_settings', 'map_id = ?', array((int) $id));
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:16,代碼來源:Model.php

示例3: deleteCategory

 /**
  * Delete a specific category
  *
  * @param int $id
  */
 public static function deleteCategory($id)
 {
     $db = BackendModel::getContainer()->get('database');
     $item = self::getCategory($id);
     if (!empty($item)) {
         $db->delete('meta', 'id = ?', array($item['meta_id']));
         $db->delete('faq_categories', 'id = ?', array((int) $id));
         $db->update('faq_questions', array('category_id' => null), 'category_id = ?', array((int) $id));
         BackendModel::deleteExtraById($item['extra_id']);
     }
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:16,代碼來源:Model.php

示例4: delete

 /**
  * Delete an item.
  *
  * @param int $id The id of the record to delete.
  */
 public static function delete($id)
 {
     // recast id
     $id = (int) $id;
     // get item
     $item = self::get($id);
     // delete extra and pages_blocks
     BackendModel::deleteExtraById($item['extra_id']);
     // delete the content_block
     BackendModel::getContainer()->get('database')->delete('content_blocks', 'id = ? AND language = ?', array($id, BL::getWorkingLanguage()));
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:16,代碼來源:Model.php

示例5: deleteCategory

 /**
  * Delete a specific category
  *
  * @param int $id
  */
 public static function deleteCategory($id)
 {
     $db = BackendModel::getContainer()->get('database');
     $item = self::getCategory($id);
     if (!empty($item)) {
         $db->delete('meta', 'id = ?', array($item['meta_id']));
         $db->delete('catalog_categories', 'id = ?', array((int) $id));
         $db->delete('catalog_categories_lang', 'id = ?', array((int) $id));
         $db->update('catalog_products', array('category_id' => null), 'category_id = ?', array((int) $id));
         // delete extra and pages_blocks
         BackendModel::deleteExtraById($item['extra_id']);
     }
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:18,代碼來源:Model.php

示例6: delete

 /**
  * Delete an item.
  *
  * @param int $id The id of the record to delete.
  *
  * @deprecated use doctrine instead
  */
 public static function delete($id)
 {
     trigger_error('Backend\\Modules\\ContentBlocks\\Engine is deprecated.
          Switch to doctrine instead.', E_USER_DEPRECATED);
     // recast id
     $id = (int) $id;
     // get item
     $item = self::get($id);
     // delete extra and pages_blocks
     BackendModel::deleteExtraById($item['extra_id']);
     // delete the content_block
     BackendModel::getContainer()->get('database')->delete('content_blocks', 'id = ? AND language = ?', [$id, BL::getWorkingLanguage()]);
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:20,代碼來源:Model.php

示例7: handle

 /**
  * @param DeleteContentBlock $deleteContentBlock
  *
  * @return ContentBlock
  */
 public function handle(DeleteContentBlock $deleteContentBlock)
 {
     $this->contentBlockRepository->removeByIdAndLocale($deleteContentBlock->contentBlock->getId(), $deleteContentBlock->contentBlock->getLocale());
     Model::deleteExtraById($deleteContentBlock->contentBlock->getExtraId());
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:10,代碼來源:DeleteContentBlockHandler.php


注:本文中的Backend\Core\Engine\Model::deleteExtraById方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。