本文整理汇总了PHP中Drupal\Core\Config\Entity\ConfigEntityBase::postCreate方法的典型用法代码示例。如果您正苦于以下问题:PHP ConfigEntityBase::postCreate方法的具体用法?PHP ConfigEntityBase::postCreate怎么用?PHP ConfigEntityBase::postCreate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Drupal\Core\Config\Entity\ConfigEntityBase
的用法示例。
在下文中一共展示了ConfigEntityBase::postCreate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postCreate
/**
* {@inheritdoc}
*/
public function postCreate(EntityStorageInterface $storage)
{
parent::postCreate($storage);
// If it was not present in the $values passed to create(), (e.g. for
// programmatic creation), populate the denormalized field_type property
// from the field storage, so that it gets saved in the config record.
if (empty($this->field_type)) {
$this->field_type = $this->getFieldStorageDefinition()->getType();
}
}
示例2: postCreate
/**
* {@inheritdoc}
*/
public function postCreate(EntityStorageInterface $storage)
{
parent::postCreate($storage);
// @todo Use self::applyDefaultValue() once
// https://www.drupal.org/node/2004756 is in.
if (!isset($this->weight)) {
$this->weight = $this->isDefaultSearch() ? -10 : 0;
}
}
示例3: postCreate
/**
* {@inheritdoc}
*/
public function postCreate(EntityStorageInterface $storage)
{
parent::postCreate($storage);
}
示例4: postCreate
/**
* {@inheritdoc}
*/
public function postCreate(EntityStorageInterface $storage)
{
parent::postCreate($storage);
$this->mergeDefaultDisplaysOptions();
}
示例5: postCreate
/**
* {@inheritdoc}
*/
public function postCreate(EntityStorageInterface $storage)
{
parent::postCreate($storage);
// Ensure there is at least one display variant.
if (!count($this->getVariants())) {
$this->addVariant(['id' => 'http_status_code', 'label' => 'Default', 'weight' => 10]);
}
}