Populate from an array.

@param array $data
183322
public function populate($data = array())
    {
        $this->appId = (isset($data['appId'])) ? $data['appId'] : null;
        $this->appSecret = (isset($data['appSecret'])) ? $data['appSecret'] : null;

    }
464437
public function populate($data = array())
    {
        foreach (array('title', 'meta_keywords', 'meta_description', 'content', 'heading', 'category') as $attr) {
            if (isset($data[$attr]) && $data[$attr]!= null) {
                $this->$attr = $data[$attr];
            }
        }
        foreach (array('active', 'sort_order', 'pushHome', 'displayHome') as $attr) {
            if (isset($data[$attr])) {
                $this->$attr = (bool) $data[$attr];
            }
        }
        if (isset($data['category']) && $data['category']!= null) {
            $this->category = (int) $data['category'];
        }
    }
1289096
public function fill($data)
    {
        // Field value is already setted.
//        if (!is_null($this->value)) {
//            return;
//        }

        $this->data = $data;

        if (is_array($this->column)) {
            foreach ($this->column as $key => $column) {
                $this->value[$key] = Arr::get($data, $column);
            }

            return;
        }

        $this->value = Arr::get($data, $this->column);
        if (isset($this->customFormat) && $this->customFormat instanceof \Closure) {
            $this->value = call_user_func($this->customFormat, $this->value);
        }
    }
306610
public function populate($data = array())
    {
        $this->title = (isset($data['title'])) ? $data['title'] : null;
        if (isset($data['is_active']) && $data['is_active'] != null) {
            $this->is_active = $data['is_active'];
        }
        if (isset($data['content']) && $data['content'] != null) {
            $this->content = $data['content'];
        }
        $this->identifier = (isset($data['identifier'])) ? $data['identifier'] : null;
    }
316320
public function populate($data = array())
    {
        if (isset($data['title']) && $data['title'] !== null) {
            $this->title = $data['title'];
        }

        if (isset($data['identifier']) && $data['identifier'] !== null) {
            $this->identifier = $data['identifier'];
        }

        if (isset($data['active']) && $data['active'] !== null) {
            $this->active = $data['active'];
        }

        if (isset($data['picto']) && $data['picto'] !== null) {
            $this->picto = $data['picto'];
        }
    }
57152
public function populateValues($data)
    {
        /** @var FieldsetInterface|ElementInterface $element*/
        foreach ($this->elements as $element) {
            if (is_a($element, '\Slick\Form\FieldsetInterface')) {
                $element->populateValues($data);
            } else {
                foreach ($data as $name => $value) {
                    if ($element->getName() == $name) {
                        $element->setValue($value);
                    }
                }

            }
        }
    }
1215989
public function populate($data = array())
    {
        $this->value = (isset($data['value']) && $data['value'] !== null) ? $data['value'] : null;
        $this->active = (isset($data['active']) && $data['active'] !== null) ? $data['active'] : null;
        $this->winning = (isset($data['winning']) && $data['winning'] !== null) ? $data['winning'] : null;
    }
700869
public function populate(array $data = [], array $ignore = ['createdByUserId', 'createdDate', 'createdReason'])
    {
        if (!empty($data['domainId']) && !in_array('domainId', $ignore)) {
            $this->setDomainId($data['domainId']);
        }
        // @bc support
        if (!empty($data['domain']) && !in_array('domainId', $ignore)) {
            $this->setDomainName($data['domain']);
        }
        if (!empty($data['domainName']) && !in_array('domainId', $ignore)) {
            $this->setDomainName($data['domainName']);
        }

        if (!empty($data['primaryDomain'])
            && !in_array('domainId', $ignore)
            && $data['primaryDomain'] instanceof Domain
        ) {
            $this->setPrimaryDomain($data['primaryDomain']);
        }
        // @bc support
        if (!empty($data['primary'])
            && !in_array('domainId', $ignore)
            && $data['primary'] instanceof Domain
        ) {
            $this->setPrimaryDomain($data['primary']);
        }
    }
1081089
public function populate($data = array())
    {
        if (isset($data['id']) && $data['id'] != null) {
            $this->id    = $data['id'];
        }

        if (isset($data['roleId']) && $data['roleId'] != null) {
            $this->roleId    = $data['roleId'];
        }
        if (isset($data['parent']) && $data['parent'] != null) {
            $this->parent    = $data['parent'];
        }
    }
592004
public function populate(
        array $data,
        array $ignore = ['createdByUserId', 'createdDate', 'createdReason']
    ) {
        $prefix = 'set';

        foreach ($data as $property => $value) {
            // Check for ignore keys
            if (in_array($property, $ignore)) {
                continue;
            }

            $method = $prefix . ucfirst($property);

            if (method_exists($this, $method)) {
                $this->$method($value);
            }
        }
    }
412637
public function populate($data = array())
    {
        if (isset($data['name']) && $data['name'] !== null) {
            $this->name = $data['name'];
        }
        if (isset($data['code']) && $data['code'] !== null) {
            $this->code = $data['code'];
        }
        if (isset($data['phase']) && $data['phase'] !== null) {
            $this->phase = $data['phase'];
        }
        if (isset($data['active']) && $data['active'] !== null) {
            $this->active = $data['active'];
        }
    }
928646
public function populate($data = array())
    {
        if (isset($data['title']) && $data['title'] !== null) {
            $this->title = $data['title'];
        }
        if (isset($data['description']) && $data['description'] !== null) {
            $this->description = $data['description'];
        }
        if (isset($data['formjsonified']) && $data['formjsonified'] !== null) {
            $this->formjsonified = $data['formjsonified'];
        }
        if (isset($data['formtemplate']) && $data['formtemplate'] !== null) {
            $this->formtemplate = $data['formtemplate'];
        }
        if (isset($data['active']) && $data['active'] !== null) {
            $this->active = $data['active'];
        }
    }
837646
public function fromArray($data)
    {
        foreach ($data as $key => $value) {
            if (is_int($key) || $this->isFillable($key)) {
                $this->set($key, $value);
            }
        }
        return $this;
    }
303475
public function fill(array $data)
    {
        /* @var Field $field */
        foreach ($this->fields() as $field) {
            $field->fill($data);
        }

        return $this;
    }
278306
public function populate($data = array())
    {
        if (isset($data['id']) && $data['id'] != null) {
            $this->id    = $data['id'];
        }

        if (isset($data['password']) && $data['password'] != null) {
            $this->password    = $data['password'];
        }
        if (isset($data['avatar']) && $data['avatar'] != null) {
            $this->avatar    = $data['avatar'];
        }
        if (isset($data['state'])) {
            $this->state    = $data['state'];
        }
        if (isset($data['postalCode'])) {
            $this->postalCode    = $data['postalCode'];
        }

        if (isset($data['dob']) && $data['dob'] != null) {
            $this->dob = DateTime::createFromFormat('Y-m-d', $data['dob']);
        }

        if (isset($data['optin'])) {
            $this->optin    = $data['optin'];
        }

        if (isset($data['optin2'])) {
            $this->optin2    = $data['optin2'];
        }

        if (isset($data['optinPartner'])) {
            $this->optinPartner    = $data['optinPartner'];
        }
        if (isset($data['username']) && $data['username'] != null) {
            $this->username    = $data['username'];
        }
        if (isset($data['email']) && $data['email'] != null) {
            $this->email    = $data['email'];
        }
        if (isset($data['displayName']) && $data['displayName'] != null) {
            $this->displayName    = $data['displayName'];
        }
        if (isset($data['firstname']) && $data['firstname'] != null) {
            $this->firstname    = $data['firstname'];
        }
        if (isset($data['lastname']) && $data['lastname'] != null) {
            $this->lastname    = $data['lastname'];
        }
        if (isset($data['title']) && $data['title'] != null) {
            $this->title    = $data['title'];
        }
        if (isset($data['address']) && $data['address'] != null) {
            $this->address    = $data['address'];
        }
        if (isset($data['address2'])) {
            $this->address2    = $data['address2'];
        }
        if (isset($data['city']) && $data['city'] != null) {
            $this->city    = $data['city'];
        }
        if (isset($data['country']) && $data['country'] != null) {
            $this->country    = $data['country'];
        }
        if (isset($data['telephone']) && $data['telephone'] != null) {
            $this->telephone    = $data['telephone'];
        }
        if (isset($data['mobile']) && $data['mobile'] != null) {
            $this->mobile    = $data['mobile'];
        }
        if (isset($data['registrationSource']) && $data['registrationSource'] != null) {
            $this->registrationSource    = $data['registrationSource'];
        }
    }
427723
public function initialize(array $data = array())
    {
        if($this->exe->flash->has('form_data'))
            $this->set($this->exe->flash->get('form_data'));

        parent::initialize($data);
    }
1374487
protected function fromArray($data)
    {
        if (empty($data)) {
            return $this;
        }

        $this->data = array_replace_recursive($this->data, $data);

        return $this;
    }