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


PHP ConfigEntityBase::delete方法代碼示例

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


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

示例1: delete

 /**
  * {@inheritdoc}
  */
 public function delete()
 {
     // Delete all migrations contained in this group.
     $query = \Drupal::entityQuery('migration')->condition('migration_group', $this->id());
     $names = $query->execute();
     // Order the migrations according to their dependencies.
     /** @var MigrationInterface[] $migrations */
     $migrations = \Drupal::entityTypeManager()->getStorage('migration')->loadMultiple($names);
     // Delete in reverse order, so dependencies are never violated.
     $migrations = array_reverse($migrations);
     foreach ($migrations as $migration) {
         $migration->delete();
     }
     // Finally, delete the group itself.
     parent::delete();
 }
開發者ID:sojo,項目名稱:d8_friendsofsilence,代碼行數:19,代碼來源:MigrationGroup.php

示例2: delete

 /**
  * {@inheritdoc}
  */
 public function delete()
 {
     foreach (array_keys($this->getLinks([], TRUE)) as $link_key) {
         $this->getMenuLinkManager()->removeDefinition($link_key, FALSE);
     }
     parent::delete();
 }
開發者ID:nerdstein,項目名稱:taxonomy_menu,代碼行數:10,代碼來源:TaxonomyMenu.php

示例3: delete

 /**
  * Given a wid, delete the workflow and its data.
  */
 public function delete()
 {
     $wid = $this->id();
     if (!$this->isDeletable()) {
         // @todo: throw error if not workflow->isDeletable().
     } else {
         // Delete associated state (also deletes any associated transitions).
         foreach ($this->getStates($all = TRUE) as $state) {
             $state->deactivate('');
             $state->delete();
         }
         // Delete the workflow.
         parent::delete();
     }
 }
開發者ID:sedurzu,項目名稱:ildeposito8,代碼行數:18,代碼來源:Workflow.php

示例4: delete

 /**
  * {@inheritdoc}
  */
 public function delete()
 {
     parent::delete();
     $this->reschedule($this->id());
 }
開發者ID:alnutile,項目名稱:drunatra,代碼行數:8,代碼來源:Importer.php

示例5: delete

 /**
  * {@inheritdoc}
  */
 public function delete()
 {
     if ($this->isLocked()) {
         throw new \LogicException('Locked statuses cannot be deleted.');
     }
     parent::delete();
 }
開發者ID:justincletus,項目名稱:webdrupalpro,代碼行數:10,代碼來源:OrderStatus.php

示例6: delete

 /**
  * {@inheritdoc}
  */
 public function delete()
 {
     foreach ($this->fields as $field) {
         $field = FieldConfig::loadByName($this->getEventEntityTypeId(), $this->getEventBundle(), $field);
         if ($field) {
             $field->delete();
         }
         $display = entity_get_form_display($this->entity_type, $this->bundle, 'rng_event');
         if (!$display->isNew()) {
             $display->delete();
         }
     }
     parent::delete();
 }
開發者ID:justincletus,項目名稱:webdrupalpro,代碼行數:17,代碼來源:EventType.php


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