Insert a separator after the item.

@param array $attributes
430730
public function divide(array $attributes = [])
    {
        $attributes['class'] = self::formatGroupClass(array('class' => 'divider'), $attributes);

        $this->items->last()->divider = $attributes;
    }
1362545
public function tr(array $attributes = []): void
    {
        $this->trArray[] = Tags::tr($this->tdArray, $attributes);
        $this->tdArray = [];
    }
808315
private function fill(array $attributes)
    {
        $name = array_filter(explode(' ', $attributes['name']));
        $name = array_shift($name);

        $bindValueName = $name;
        if (substr($name, -1) === '.') {
            $bindValueName = substr($bindValueName, 0, -1);
        }

        $attributes['value'] = $this->getValue($bindValueName, $attributes['value'] ?? null);

        $binding = explode('.', $name);

        $attributes['name'] = '';
        foreach ($binding as $key => $bind) {
            if (! is_null($attributes['prefix'])) {
                $attributes['name'] .= '['.$bind.']';
                continue;
            }

            if ($key === 0) {
                $attributes['name'] .= $bind;
                continue;
            }

            $attributes['name'] .= '['.$bind.']';
        }

        return $attributes;
    }
943653
private function fill($attributes)
    {
        // json
        if (is_string($attributes)) {
            $attributes = json_decode($attributes, true);
        }

        // check if attributes are valid
        if (!is_array($attributes)) {
            throw new \InvalidArgumentException('Attributes must be of type array or a valid json string');
        }

        foreach ($attributes as $key => $value) {
            $this->setAttribute($key, $value);
        }
    }
578153
public function setAttributes(array $attributes): void
    {
        $this->checkAttributeAssignable(array_keys($attributes));

        $this->setRawAttributes($attributes);
    }
1268900
public static function attributes(array $attributes = NULL)
    {
        if (!$attributes) return;

        asort($attributes);
        $h = '';
        foreach ($attributes as $k => $v) {
            $h .= " $k=\"" . self::h($v) . '"';
        }
        return $h;
    }
1244940
public function fill(array $attributes) {
        $locales = Locale\get_locales();

        foreach($locales as $locale => $options)
            if( in_array($locale, array_keys($attributes)) )
                $this->translations[$locale] = array_pull($attributes, $locale);

        return parent::fill($attributes);
    }
451673
private function appendAttributes(array $attrs)
    {
        foreach ($attrs as $key => $value) {
            $this->appendAttribute($key, $value);
        }
    }
688106
public function setAttributes($attributes)
    {
        if (! is_array($attributes)) {
            $attributes = [$attributes];
        }

        $this->attributes = $attributes;

        return $this;
    }
1032725
public function init($attributes) 
    {
        $this->autoresize_types = array(  
            _('Fit to Width')      => 'max_width',
            _('Fit to Height')     => 'max_height',
            _('Scale')          => 'scale',
            _('Crop and Scale') => 'crop_and_scale',
        );

        parent::init($attributes);
        $this->fileInput = new FileInput( $this->name, $attributes);

        $this->imageCover = new Div(array('class' => 'formkit-image-cover'));
        $this->imageCover->setAttributeValue('data-width', $this->dataWidth ?: 200);
        $this->imageCover->setAttributeValue('data-height', $this->dataHeight);

        $this->inputWrapper = new Div;
        $this->inputWrapper
            ->addClass('formkit-widget-thumbimagefile')
            ->addClass('formkit-image-wrapper');

        // if it has a value, generate img
        if ($this->renderImageTag && $this->value) {
            $this->image = new Element('img',array(
                'src' => $this->prefix . $this->value,
            ));
            $this->imageCover->append($this->image);
        }

        if ($this->value) {
            $this->fileInput->setAttributeValue('data-image-src', $this->prefix . $this->value);
        }
        if ($this->exif) {
            $this->fileInput->setAttributeValue('data-exif', 'true');
        }
        if ($this->autoresize) {
            $this->fileInput->setAttributeValue('data-autoresize','true');
        }
        if ($this->droppreview) {
            $this->fileInput->setAttributeValue('data-droppreview','true');
        }
        if ($this->dropupload) {
            $this->fileInput->setAttributeValue('data-dropupload','true');
        }

        $this->fileInput->setAttributeValue('data-width', $this->dataWidth);
        $this->fileInput->setAttributeValue('data-height', $this->dataHeight);


        $this->inputWrapper->append($this->imageCover);
        $this->inputWrapper->append($this->fileInput);

        if ($this->autoresize && $this->autoresize_input) {
            $this->fileInput->setAttributeValue('data-autoresize-input','true');
            $checkbox = new CheckboxInput($this->name . '_autoresize');
            $checkbox->addClass('autoresize-checkbox');

            if( $this->autoresize_input_check ) {
                $checkbox->check();
            }

            $checkboxId = $checkbox->getSerialId();

            $label    = new Label(_("Use auto-resize"));
            $label->for($checkboxId);
            $resizeWrapper = new Div;
            $resizeWrapper->append($checkbox);
            $resizeWrapper->append($label);
            $resizeWrapper->addClass("autoresize");
            $this->inputWrapper->append($resizeWrapper);

            if ($this->autoresize_type_input) {
                $resizeTypeWrapper = new Div;
                $resizeTypeWrapper->addClass('autoresize-type');
                $typeSelector = new SelectInput($this->name . '_autoresize_type', [
                    'options' => $this->autoresize_types,
                    'value'   => $this->autoresize_type,
                ]);
                $typeSelector->addClass('autoresize-type-selector');
                $resizeTypeWrapper->append($typeSelector);
                $this->inputWrapper->append($resizeTypeWrapper);
            }

        }
    }
1100746
private function sanitizeAttributes(array $attributes)
    {
        $sanitizeAttributes = [];
        foreach ($attributes as $key => $value) {
            $key = $this->formatAttribute($key);
            if (isset($sanitizeAttributes[$key])) {
                if (!is_array($sanitizeAttributes[$key])) {
                    $sanitizeAttributes[$key] = [$sanitizeAttributes[$key]];
                }

                if (!is_array($value)) {
                    $value = [$value];
                }

                $value = $sanitizeAttributes[$key] + $value;
            }

            $sanitizeAttributes[$key] = $value;
        }

        return $sanitizeAttributes;
    }
275165
public function asDiv($attributes = [], $children_attributes = [], $item_attributes = [], $item_after_calback = null, $item_after_calback_params = [])
    {
        return '<div'.self::attributes($attributes).'>'.$this->render('div', null, $children_attributes, $item_attributes, $item_after_calback, $item_after_calback_params).'</div>';
    }
363529
public function append($attributes)
    {
        $this->appends = array_unique(
            array_merge($this->appends, is_string($attributes) ? func_get_args() : $attributes)
        );

        return $this;
    }
17448
protected function attributes($attributes)
    {
        $html = array();
        foreach ((array) $attributes as $key => $value)
        {
            $element = $this->attributeElement($key, $value);

            if ( ! is_null($element)) $html[] = $element;
        }

        $output = count($html) > 0 ? ' '.implode(' ', $html) : '';

        return trim($output);
    }
380898
private function appendOldAttributes(array $attributes)
    {
        // Get a current collection
        $collection = $this->sessionBag->get(self::PARAM_STORAGE_KEY);

        // Merge new attributes with collection
        $collection = array_merge($collection, $attributes);

        // Override old collection with a new one
        $this->sessionBag->set(self::PARAM_STORAGE_KEY, $collection);
    }
627618
public function attr(array $attributes)
    {
        $result = '';

        foreach ($attributes as $attribute => $value) {
            $result .= ' '.(is_int($attribute) ? $value : $attribute.'="'.str_replace('"', '&quot;', $value).'"');
        }

        return $result;
    }
486378
public static function attributes(array $attributes = array())
    {
        $text = array();
        foreach ($attributes as $key => $value) {
            //if we have numeric keys (e.g. checked), set the value as
            //the $key (e.g. checked="checked"), but only if it
            //doesn't exist already
            if (is_numeric($key)) {
                $value = htmlspecialchars($value);
                if (!isset($attributes[$value])) {
                    $text[] = $value . '="' . $value . '"';
                }
                continue;
            }
            $text[] = $key . '="' . htmlspecialchars($value) . '"';
        }

        return empty($text) ? '' : ' ' . implode(' ', $text);
    }