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


PHP Section::delete方法代码示例

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


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

示例1: remove

 public static function remove($name)
 {
     $sectionManager = new Section();
     $sectionManager->load(array('label' => $name));
     $rightManager = new Right();
     $rightManager->delete(array('section' => $sectionManager->getId()));
     $sectionManager->delete(array('id' => $sectionManager->getId()));
 }
开发者ID:kofeve,项目名称:yana-server,代码行数:8,代码来源:Section.class.php

示例2: __actionDelete

 public function __actionDelete(array $sections, $redirect)
 {
     $success = true;
     $callback = Administration::instance()->getPageCallback();
     $current_page = $callback['pageroot'] . (isset($callback['context'][0]) && $callback['context'][0] != 'index' ? $callback['context'][0] . '/' : NULL);
     foreach ($sections as $handle) {
         try {
             Section::delete(Section::loadFromHandle($handle));
             ###
             # Delegate: SectionPostDelete
             Extension::notify('SectionPostDelete', $current_page, array('handle' => $handle));
         } catch (SectionException $e) {
             $success = false;
             $this->alerts()->append($e->getMessage(), AlertStack::ERROR, $e);
         } catch (Exception $e) {
             $success = false;
             $this->alerts()->append(__('An unknown error has occurred. <a class="more">Show trace information.</a>'), AlertStack::ERROR, $e);
         }
     }
     if ($success) {
         redirect($redirect);
     }
 }
开发者ID:brendo,项目名称:symphony-3,代码行数:23,代码来源:content.blueprintssections.php

示例3: delete

 /**
  * delete section from system
  * 
  * @return void
  */
 public function delete($id)
 {
     $s = new Section($id);
     $s->delete();
     redirect('section_editor');
 }
开发者ID:kabircse,项目名称:Codeigniter-Egypt,代码行数:11,代码来源:section_editor.php

示例4: Publication

$f_issue_number = Input::Get('f_issue_number', 'int', 0);
$f_language_id = Input::Get('f_language_id', 'int', 0);
$f_section_number = Input::Get('f_section_number', 'int', 0);
$f_delete_all_section_translations = Input::Get('f_delete_all_section_translations', 'string', '', true);
$f_delete_all_articles_translations = Input::Get('f_delete_all_articles_translations', 'string', '', true);
$publicationObj = new Publication($f_publication_id);
$issueObj = new Issue($f_publication_id, $f_language_id, $f_issue_number);
$sectionObj = new Section($f_publication_id, $f_issue_number, $f_language_id, $f_section_number);
$sectionName = $sectionObj->getName();
$articles = Article::GetArticles($f_publication_id, $f_issue_number, $f_section_number, $f_language_id);
$numArticles = count($articles);
$numArticlesDeleted = 0;
$f_delete_all_section_translations = $f_delete_all_section_translations == 'Y' ? true : false;
$f_delete_all_articles_translations = $f_delete_all_articles_translations == 'Y' ? true : false;
if ($f_delete_all_section_translations == false) {
    $numArticlesDeleted = $sectionObj->delete(true, $f_delete_all_articles_translations);
    $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
    $cacheService->clearNamespace('section');
} else {
    $sectionTranslations = Section::GetSections($f_publication_id, $f_issue_number, null, null, $sectionObj->getName(), null);
    foreach ($sectionTranslations as $key => $sectionTranslation) {
        $numArticlesDeleted += $sectionTranslation->delete(true, $f_delete_all_articles_translations);
    }
}
$offsetVarName = 'SectOffs_' . $f_publication_id . '_' . $f_issue_number . '_' . $f_language_id;
$SectOffs = camp_session_get($offsetVarName, 0);
$totalSections = Section::GetTotalSections($f_publication_id, $f_issue_number, $f_language_id);
if ($SectOffs >= $totalSections) {
    camp_session_set($offsetVarName, 0);
}
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj, 'Section' => $sectionObj);
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_del.php

示例5: Widget

<?php

require_once 'Widget.class.php';
$table = new Widget();
$table->drop();
$table_section = new Section();
$id_section = $table_section->load(array("label" => "dashboard"))->getId();
$table_section->delete(array('label' => 'dashboard'));
$table_right = new Right();
$table_right->delete(array('section' => $id_section));
开发者ID:thib3113,项目名称:yana-server,代码行数:10,代码来源:uninstall.php

示例6: KodiCmd

<?php

require_once 'KodiCmd.class.php';
// Suppression de la table du plugin
$table = new KodiCmd();
//$table->drop();
$execQuery = $table->query('DROP TABLE yana_plugin_kodi');
$table_configuration = new configuration();
$table_configuration->getAll();
$table_configuration->remove('plugin_kodiCmd_api_url_kodi');
$table_configuration->remove('plugin_kodiCmd_api_timeout_kodi');
$table_configuration->remove('plugin_kodiCmd_api_recognition_status');
// suppression de la piece KODI
$table_room = new Room();
$table_room->delete(array('name' => 'KODI'));
// Recuperation de l'id et Suppression de la section
$table_section = new Section();
$id_section = $table_section->load(array("label" => "kodi"))->getId();
$table_section->delete(array('label' => 'kodi'));
// suppression des droits correspondant à la section
$table_right = new Right();
$table_right->delete(array('section' => $id_section));
开发者ID:eflye,项目名称:yana-plugins,代码行数:22,代码来源:uninstall.php

示例7: Sensor

<?php

/* 
	Le code contenu dans cette page ne sera éxecuté qu'à la désactivation du plugin 
	Vous pouvez donc l'utiliser pour supprimer des tables SQLite, des dossiers, ou executer une action
*/
require_once 'Sensor.class.php';
require_once 'SensorType.class.php';
$table = new Sensor();
$table2 = new SensorType();
$table->drop();
$table2->drop();
$conf = new Configuration();
$conf->delete(array('key' => 'plugin_sensor_receptor_pin'));
$table_section = new Section();
$id_section = $table_section->load(array("label" => "sensor"))->getId();
$id_section2 = $table_section->load(array("label" => "sensortypes"))->getId();
$table_section->delete(array('label' => 'sensor'));
$table_section2->delete(array('label' => 'sensortypes'));
$table_right = new Right();
$table_right->delete(array('section' => $id_section));
$table_right->delete(array('section' => $id_section2));
开发者ID:sachaw0lf,项目名称:yana-sensor-plugin,代码行数:22,代码来源:uninstall.php


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