Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AbstractModelHydrator.php
Go to the documentation of this file.
1 <?php
7 
12 {
16  public function extract($entity)
17  {
18  return $entity->getData();
19  }
20 
24  public function hydrate($entity, array $data)
25  {
26  $entity->setData(array_merge($entity->getData(), $data));
27  return $entity;
28  }
29 }
$entity
Definition: element.phtml:22