Exemplo n.º 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();
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function postCreate(EntityStorageInterface $storage)
 {
     parent::postCreate($storage);
 }
Exemplo n.º 4
0
Arquivo: View.php Projeto: shumer/blog
 /**
  * {@inheritdoc}
  */
 public function postCreate(EntityStorageInterface $storage)
 {
     parent::postCreate($storage);
     $this->mergeDefaultDisplaysOptions();
 }
Exemplo n.º 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]);
     }
 }