Example #1
0
 /**
  * {@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();
     }
 }
Example #2
0
 /**
  * {@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;
     }
 }
Example #3
0
 /**
  * {@inheritdoc}
  */
 public function postCreate(EntityStorageInterface $storage)
 {
     parent::postCreate($storage);
 }
Example #4
0
File: View.php Project: shumer/blog
 /**
  * {@inheritdoc}
  */
 public function postCreate(EntityStorageInterface $storage)
 {
     parent::postCreate($storage);
     $this->mergeDefaultDisplaysOptions();
 }
Example #5
0
 /**
  * {@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]);
     }
 }