Esempio n. 1
0
 public function build(StoreModel $entity = null)
 {
     $do = new StoreDO();
     if ($entity) {
         $entityData = $entity->toArray();
         $entityData['views'] = $this->storeViewBuilder->buildThem($entity->views);
         $entityData['attribute_sets'] = $this->attributeSetBuilder->buildThem($entity->attributeSets);
         $do->update($entityData);
     }
     return $do;
 }
Esempio n. 2
0
 public function handle(CreateStoreDO $do)
 {
     $store = new StoreModel();
     $store->label = $do->label;
     $store->save();
 }