/**
  * Method that is called when field is added to a type.
  *
  * @param TypeInterface $type
  */
 public function onAddedToType(TypeInterface &$type)
 {
     parent::onAddedToType($type);
     if ($this->getAddIndex()) {
         $type->addIndex(new Index($this->name));
     }
 }
 /**
  * Method that is called when field is added to a type.
  *
  * @param TypeInterface $type
  */
 public function onAddedToType(TypeInterface &$type)
 {
     parent::onAddedToType($type);
     if ($this->getAddIndex()) {
         $type->addIndex(new Index($this->name));
     }
     $type->addTrait(CreatedAtInterface::class, CreatedAtInterfaceImplementation::class)->serialize($this->name);
 }
 /**
  * {@inheritdoc}
  */
 public function onAddedToType(TypeInterface &$type)
 {
     parent::onAddedToType($type);
     if ($this->getIndexOnCity()) {
         $type->addIndex(new Index($this->getPrefixedFieldName('city')));
     }
     if ($this->getIndexOnZipCode()) {
         $type->addIndex(new Index($this->getPrefixedFieldName('zip_code')));
     }
     if ($this->getIndexOnRegion()) {
         $type->addIndex(new Index($this->getPrefixedFieldName('region')));
     }
     if ($this->getIndexOnCountry()) {
         $type->addIndex(new Index($this->getPrefixedFieldName('country_code')));
     }
 }
 /**
  * Method that is called when field is added to a type.
  *
  * @param TypeInterface $type
  */
 public function onAddedToType(TypeInterface &$type)
 {
     parent::onAddedToType($type);
     $type->addTrait(IsArchivedInterface::class, IsArchivedInterfaceImplementation::class)->serialize($this->getName());
 }
 /**
  * {@inheritdoc}
  */
 public function onAddedToType(TypeInterface &$type)
 {
     parent::onAddedToType($type);
     if ($this->getAddIndex()) {
         $type->addIndex(new Index($this->relation_name, [$this->type_field_name, $this->name]));
         $type->addIndex(new Index($this->name));
     }
     $type->serialize($this->type_field_name, $this->name);
 }
 /**
  * Method that is called when field is added to a type.
  *
  * @param TypeInterface $type
  */
 public function onAddedToType(TypeInterface &$type)
 {
     parent::onAddedToType($type);
     if ($this->getAddIndex()) {
         $type->addIndex(new Index($this->name));
     }
     $type->addTrait(PositionInterface::class, PositionInterfaceImplementation::class);
 }
 /**
  * Method that is called when field is added to a type.
  *
  * @param TypeInterface $type
  */
 public function onAddedToType(TypeInterface &$type)
 {
     parent::onAddedToType($type);
     if ($this->getAddIndex()) {
         $index_fields = [$this->name];
         if (count($this->getAddIndexContext())) {
             $index_fields = array_merge($index_fields, $this->getAddIndexContext());
         }
         $type->addIndex(new Index($this->name, $index_fields, $this->getAddIndexType()));
     }
 }
 /**
  * Method that is called when field is added to a type.
  *
  * @param TypeInterface $type
  */
 public function onAddedToType(TypeInterface &$type)
 {
     parent::onAddedToType($type);
     $type->addTrait(AdditionalPropertiesInterface::class, AdditionalPropertiesInterfaceImplementation::class)->protectFields($this->getName());
 }