本文整理汇总了PHP中Drupal\Core\Field\FieldStorageDefinitionInterface::isDeleted方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldStorageDefinitionInterface::isDeleted方法的具体用法?PHP FieldStorageDefinitionInterface::isDeleted怎么用?PHP FieldStorageDefinitionInterface::isDeleted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Field\FieldStorageDefinitionInterface
的用法示例。
在下文中一共展示了FieldStorageDefinitionInterface::isDeleted方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: storageDefinitionIsDeleted
/**
* Determines whether the passed field has been already deleted.
*
* @param \Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition
* The field storage definition.
*
* @return bool
* Whether the field has been already deleted.
*/
protected function storageDefinitionIsDeleted(FieldStorageDefinitionInterface $storage_definition)
{
// Configurable fields are marked for deletion.
if ($storage_definition instanceof FieldStorageConfigInterface) {
return $storage_definition->isDeleted();
}
// For non configurable fields check whether they are still in the last
// installed schema repository.
return !array_key_exists($storage_definition->getName(), $this->entityManager->getLastInstalledFieldStorageDefinitions($this->entityTypeId));
}