当前位置: 首页>>代码示例>>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;未经允许,请勿转载。