本文整理匯總了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]);
}
}