コード例 #1
0
ファイル: FieldConfigBase.php プロジェクト: ddrozdik/dmaps
 /**
  * {@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
0
ファイル: SearchPage.php プロジェクト: aWEBoLabs/taxi
 /**
  * {@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
0
ファイル: Page.php プロジェクト: neeravbm/unify-d8
 /**
  * {@inheritdoc}
  */
 public function postCreate(EntityStorageInterface $storage)
 {
     parent::postCreate($storage);
 }
コード例 #4
0
ファイル: View.php プロジェクト: shumer/blog
 /**
  * {@inheritdoc}
  */
 public function postCreate(EntityStorageInterface $storage)
 {
     parent::postCreate($storage);
     $this->mergeDefaultDisplaysOptions();
 }
コード例 #5
0
ファイル: Page.php プロジェクト: pulibrary/recap
 /**
  * {@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]);
     }
 }