本文整理汇总了PHP中Drupal\Core\Field\FieldItemBase::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldItemBase::delete方法的具体用法?PHP FieldItemBase::delete怎么用?PHP FieldItemBase::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Field\FieldItemBase
的用法示例。
在下文中一共展示了FieldItemBase::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete()
{
$field_collection_item = $this->getFieldCollectionItem();
// Set a flag to remember that the host entity is being deleted. See
// \Drupal\field_collection\Entity\FieldCollectionItem::deleteHostEntityReference().
if ($field_collection_item !== NULL) {
$field_collection_item->field_collection_deleting = TRUE;
$field_collection_item->delete();
}
parent::delete();
}
示例2: delete
public function delete()
{
$field_collection_item = $this->getFieldCollectionItem();
if ($field_collection_item !== NULL) {
$field_collection_item->delete();
}
parent::delete();
}
示例3: delete
/**
* {@inheritdoc}
*/
public function delete()
{
parent::delete();
$deleted_languages = \Drupal::state()->get('entity_test.delete.' . $this->getFieldDefinition()->getName()) ?: [];
$deleted_languages[] = $this->getLangcode();
\Drupal::state()->set('entity_test.delete.' . $this->getFieldDefinition()->getName(), $deleted_languages);
}