本文整理汇总了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();
}
示例2: delete
/**
* {@inheritdoc}
*/
public function delete()
{
foreach (array_keys($this->getLinks([], TRUE)) as $link_key) {
$this->getMenuLinkManager()->removeDefinition($link_key, FALSE);
}
parent::delete();
}
示例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();
}
}
示例4: delete
/**
* {@inheritdoc}
*/
public function delete()
{
parent::delete();
$this->reschedule($this->id());
}
示例5: delete
/**
* {@inheritdoc}
*/
public function delete()
{
if ($this->isLocked()) {
throw new \LogicException('Locked statuses cannot be deleted.');
}
parent::delete();
}
示例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();
}