Writes the fields to the label.

@param array $data
199819
private function build(array $data)
    {
        foreach ($this->layout as $key => $c) {
            if (!isset($data[$key]) || 0 === strlen($value = $data[$key])) {
                continue;
            }

            if (isset($c['prepend'])) $value = $c['prepend'] . $value;
            if (isset($c['append'])) $value .= $c['append'];

            $angle = isset($c['a']) ? $c['a'] : 0;
            $color = isset($c['c']) ? $c['c'] : 'black';
            $font = isset($c['f']) ? $c['f'] : 'swiss_normal';

            $this->text($value, $c['s'], $c['x'], $c['y'], $color, $font, $angle);
        }

        // Primary barcode
        $matrix = imagecreatefromstring($this->getBarcodeDatamatrix($data[Config::T8902]));
        imagecopy($this->image, $matrix, 57, 398, 0, 0, imagesx($matrix), imagesy($matrix));
        imagedestroy($matrix);

        // Mondial relay
        if (isset($data[Config::T200]) && $data[Config::T200] === 'SHD') {
            $this->text('Mondial Relay', 40, 475, 420);

            // Barcode
            $barcode = imagecreatefromstring($this->getBarcode128($data[Config::T8913]));
            imagecopy($this->image, $barcode, 425, 462, 0, 0, imagesx($barcode), imagesy($barcode));
            imagedestroy($barcode);

            $this->text('GLS' . $data[Config::T8913], 32, 500, 670);
        }

        // Secondary barcode
        $matrix = imagecreatefromstring($this->getBarcodeDatamatrix($data[Config::T8903]));
        imagecopy($this->image, $matrix, 895, 400, 0, 0, imagesx($matrix), imagesy($matrix));
        imagedestroy($matrix);

        // Pages
        if (isset($data[Config::T8904]) && isset($data[Config::T8905])) {
            $pages = $data[Config::T8904] . '/' . $data[Config::T8905];
            $this->text($pages, 20, 792, 780);
        }

        // Service label
        $service = null;
        if (isset($data[Config::T750])) {
            $service = $data[Config::T750];
        } elseif (isset($data[Config::T200]) && $data[Config::T200] === 'T13') {
            $service = '13.00SERVICE';
        }
        if ($service) {
            $this->text($service, 38, 30, 870);
        }

        // Téléphones
        if (isset($data[Config::T1230])) {
            $this->text($data[Config::T1230], 38, 30, 1175);
        } elseif (isset($data[Config::T871])) {
            $this->text($data[Config::T871], 38, 30, 1175);
        }

        // Ref. destinataire
        if (isset($data[Config::T859]) && !empty($value = $data[Config::T859])) {
            $this->text('Ref Dest : ' . $value, 22, 600, 1230);
        }

        // Pays / Code postal / Ville destinataire
        $this->text($data[Config::T100] . ' ' . $data[Config::T330] . ' ' . $data[Config::T864], 30, 30, 1518);

        // Expediteur
        $this->text('Expediteur', 28, 1110, 810, 'black', 'swiss_bold', 270);

        // Pays / Code postal / Ville expéditeur
        $value = $data[Config::T821] . ' ' . $data[Config::T822] . ' ' . $data[Config::T823];
        $this->text($value, 28, 925, 830, 'black', 'swiss_normal', 270);
    }
180452
protected function save($data)
    {
        $currentStep = $this->getCurrentStep();
        if (is_array($data)) {
            foreach ($data as $field => $value) {
                if (in_array($field, $this->config()->get('ignored_fields'))) {
                    unset($data[$field]);
                }
            }
            $currentStep->saveData($data);
        }
        return;
    }
1129386
protected function setLabels()
    {
        if ($this->data['labels.overrides']) {
            $this->labels = array_replace($this->labels, $this->data['labels.overrides']);
        }
    }
1058019
public function writeArray($data) {

            if (!count($data)) {
                $this->stream->writeLong(0);
            } else {
                end($data);
                $last = key($data);
                $this->stream->writeLong($last+1);
                for($i=0;$i<=$last;$i++) {
                    if (isset($data[$i])) {
                        $this->writeAMFData($data[$i]);
                    } else {
                        $this->stream->writeByte(SabreAMF_AMF0_Const::DT_UNDEFINED);
                    }
                }
            }

        }
392907
public function write(iterable $data, ?array $headers = null): void
    {
        $this->assertAttached();

        $this->begin($headers);

        foreach ($data as $element) {
            $this->writeElement($element);
        }

        $this->end();
    }
34846
public function fill($data)
    {
        // Field value is already setted.
//        if (!is_null($this->value)) {
//            return;
//        }

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

            return;
        }

        $this->value = array_get($data, $this->column);
    }
904469
public function setStartUpdate(array $data)
    {
        $this->setStart("UPDATE ".$this->model->getDbTable()." SET ".$this->getColumnsForUpdate($data));
    }
378536
private function setData(array $data)
    {
        $_documentClass = $this->_documentClass;
        $_edgeClass = $this->_edgeClass;

        if (isset($this->_options[self::ENTRY_FLAT]) && $this->_options[self::ENTRY_FLAT]) {
            $this->_result = $data;
        } else {
            $this->_result = [];

            if ($this->_options[self::ENTRY_TYPE] === Collection::TYPE_EDGE) {
                foreach ($data as $row) {
                    $this->_result[] = $_edgeClass::createFromArray($row, $this->_options);
                }
            } else {
                foreach ($data as $row) {
                    $this->_result[] = $_documentClass::createFromArray($row, $this->_options);
                }
            }
        }
    }
926389
public function applyData ( $data = NULL ) {
        if (NULL != $data && is_array( $data )) {
            foreach ($data as $propName => $propValue) {
                $this->assignValue( $propName, $propValue );
            }
        } else {
            $this->buildVars();
        }
    }
609848
public function setData($data)
    {
        if (!is_string($data)) {
            $data = json_encode($data);
        }

        $this->data = $data;
    }
567535
public void writeData(String data) {
        _buffer.append("<![CDATA[");
        _buffer.append( data);
        _buffer.append( "]]>");
    }
496331
protected function onInput($data)
    {
        $ndata = array();
        foreach ($this->params as $colname) {
            if (isset($data[$colname])) {
                $ndata[$colname] = $data[$colname];
            }
        }

        $this->next($ndata);
    }
1279258
public function handleArray(array $data = []): void
    {
        $this->getForm()->submit($data);
        $this->handleForm($data['page'] ?? null);
    }
836716
protected function saveProductProperties($data)
    {
        $properties = isset($data['property']) ? $data['property'] : [];

        if (count($properties) > 0) {
            foreach ($properties as $key => $property) {
                foreach ($property as $propertyId => $propertyValue) {
                    $propertyModel = Property::findorfail($propertyId);
                    $propertyModel->attachProduct($this)
                                    ->fill(['value' => $propertyValue])
                                    ->save();
                    $syncProperty[] = $propertyId;
                }
                $this->properties()->sync($syncProperty);
            }
        }
    }
130207
public function setData($data)
    {
        foreach($this->data as $args)
        {
            Event::off(...$args);
        }
        $this->data = $data;
        foreach($this->data as $args)
        {
            Event::on(...$args);
        }
    }
865168
public function reset($data = [], $labels = [])
    {
        $this->_attributes = $data;
        $this->_labels = $labels;
        $this->_errors = [];
        $this->_validations = [];
        return $this;
    }
1273006
public function log(array $data)
    {
        $data['query'] = $this->query;
        $data['fields'] = $this->fields;
        call_user_func($this->loggerCallable, $data);
    }