Hydrate the update form for this object, before passing it to the update template

@param mixed $object
511339
protected function hydrateObjectForm($object)
    {
        $data = array(
            "id" => $object->getId(),
            "visible" => (bool) $object->getVisible(),
            "code" => $object->getCode(),
            "title" => $object->getTitle(),
            "type" => $object->getType(),
            "entity" => $object->getEntity(),
            "serialized_columns" => $object->getSerializedColumns(),
            "serialized_condition" => $object->getSerializedCondition(),
            "index_engine_driver_configuration_id" => $object->getIndexEngineDriverConfigurationId(),
        );

        return $this->getUpdateForm($data);
    }
817471
public function preUpdate($object): void
    {
        /** @var BlockAdmin $block */
        $block = $this->blockManager->get($object);

        $block->preUpdate($object);

        // fix weird bug with setter object not being call
        $object->setChildren($object->getChildren());

        $dashboard = $object->getDashboard();

        if ($dashboard instanceof DashboardInterface) {
            $dashboard->setEdited(true);
        }
    }
1222373
public function hydrate(array $data, $object)
    {
        if (isset($data['timestamp'])) {
            $object->setCreatedAt(new \DateTime($data['timestamp']));
        }
        if (isset($data['resource-title'])) {
            $object->setTitle($data['resource-title']);
        }
        if (isset($data['resource-type'])) {
            $object->setType($data['resource-type']);
        }
        if (isset($data['message'])) {
            $object->setMessage($data['message']);
        }
        if (isset($data['containing-class'])) {
            $object->setClassName($data['containing-class']);
        }
        if (isset($data['certname'])) {
            $object->setNodeName($data['certname']);
        }
        if (isset($data['status'])) {
            $object->setStatus($data['status']);
        }
        return $object;
    }
546957
protected function doAdd($object)
    {
        $this->notifyAccess();
        $this->objectsArray[$this->total] = $object;
        $this->total++;
    }
158051
public function hydrate( array $data, $object )
    {
        if ( $object instanceof MapperAwareInterface )
        {
            $object->setMapper( $this );
        }

        if ( $object instanceof Structure )
        {
            if ( ! empty( $data['cssFile'] ) && is_file( $data['cssFile'] ) )
            {
                $object->parseFile( $data['cssFile'] );
            }
            else if ( ! empty( $data['css'] ) )
            {
                $object->parseString( $data['css'] );
            }
        }
        else
        {
            if ( ! empty( $data['cssFile'] ) && is_file( $data['cssFile'] ) )
            {
                $object->css = file_get_contents( $data['cssFile'] );
            }
            else if ( ! empty( $data['css'] ) )
            {
                $object->css = (string) $data['css'];
            }
        }

        if ( array_key_exists( 'rootId', $data ) )
        {
            $object->rootId = $data['rootId'];
        }

        return $object;
    }
1238494
public function hydrate(array $data, $object)
    {
        if (!$object instanceof User) {
            throw new \Exception('$object must be an instance of User');
        }

        return parent::hydrate($data, $object);
    }
538479
public function setObject($object)
    {
        if (!is_object($object)) {
            throw new Exception\InvalidArgumentException(sprintf(
                '%s expects an object argument; received "%s"',
                __METHOD__,
                gettype($object)
            ));
        }

        if (property_exists($this, 'hydrator') && $this->hydrator) {
            $values = $this->getHydrator()->extract($object);
            foreach ($this->getFieldsets() as $name => $fieldset) {
                if (isset($values[$name]) && is_object($values[$name])) {
                    $fieldset->setObject($values[$name]);
                }
            }
        }

        if (property_exists($this, 'object')) {
            $this->object = $object;
        }

        return $this;
    }
1077191
public function hydrate(array $data, $object)
    {
        if (!$object instanceof BlockEntityInterface) {
            throw new Exception\InvalidArgumentException(
                '$object must be an instance of PlaygroundCms\Entity\BlockInterface'
            );
        }
        //$data = $this->mapField('block_id', 'id', $data);
        return parent::hydrate($data, $object);
    }
379281
protected function beforeObjectIsStored($object)
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException(sprintf('You must only pass object to this container (%s), "%s" passed as parameter!', get_called_class(), gettype($object)), __LINE__);
        }
        $instanceOf = $this->objectClass();
        if (get_class($object) !== $this->objectClass() && !$object instanceof $instanceOf) {
            throw new \InvalidArgumentException(sprintf('Model of type "%s" does not match the object contained by this class: "%s"', get_class($object), $this->objectClass()), __LINE__);
        }
    }
1321723
public function hydrate(array $data, $object)
    {
        parent::hydrate($data, $object);

        foreach ($this->getFreeValuesKeys() as $key) {
            if (isset($data[$key])) {
                $object->set($key, $data[$key]);
            }
        }

        return $object;
    }
915739
protected function hydrateObjectForm($object)
    {
        $data = [
            'id'          => $object->getId(),
            'code'        => $object->getCode(),
            'type'        => $object->getType(),
            'native'      => $object->getNative(),
            'by_module'   => $object->getByModule(),
            'block'       => $object->getBlock(),
            'active'      => $object->getActivate(),
            'locale'      => $object->getLocale(),
            'title'       => $object->getTitle(),
            'chapo'       => $object->getChapo(),
            'description' => $object->getDescription(),
        ];

        return $this->createForm(AdminForm::HOOK_MODIFICATION, 'form', $data);
    }
750477
public function updateFromObject(stdClass $object)
    {
        $this->bodyParts               = EmailBodyPartCollection::createFromObjects(property_exists($object, 'bodyParts') ? $object->bodyParts : null);
        $this->contentTransferEncoding = $object->contentTransferEncoding;
        $this->contentType             = $object->contentType;
        $this->rawContent              = property_exists($object, 'rawContent') ? $object->rawContent : null;
    }
994556
public function preUpdate($object)
    {
        $this->blockManager->get($object)->preUpdate($object);

        // fix weird bug with setter object not being call
        $object->setChildren($object->getChildren());

        if ($object->getPage() instanceof PageInterface) {
            $object->getPage()->setEdited(true);
        }
    }
539444
public function hydrate($object, array $array)
    {
        $reflected = new \ReflectionClass($object);

        if (is_string($object)) {
            $object = $this->createInstance($reflected);
        }

        foreach ($array as $key => $value) {
            $attributeName = $this->formatter->toPhpAttribute($key);

            if ($reflected->hasProperty($attributeName)) {

                $property = $reflected->getProperty($attributeName);
                $this->setValue($object, $property, $value);
            } elseif ($this->isSchemaless()) {
                $object->$attributeName = $value;
            }
        }

        return $object;
    }
958256
public function hydrate(array $data, $object)
    {
        if (!$object instanceof Request) {
            throw new \Exception('$object must be an instance of Request');
        }

        return parent::hydrate($data, $object);
    }
751320
protected function prepare($object)
    {
        $this->metadata = $this->objectManager->getClassMetadata(get_class($object));
        $this->prepareStrategies();
    }
767791
public function preRemove($object)
    {
        if ($classType = $object->getClassType()) {
            $contentObject = $this->getModelManager()->find($classType, $object->getObjectId());
            if ($contentObject) {
                $this->getModelManager()->delete($contentObject);
            }
        }

        $this->autoPageDraft($object->getPage());
    }