Sets the wrappers attributes

@since  1.0.0
@access public
511113
public function set_attributes() {

		if ( empty( $this->attributes['id'] ) ) {
			$this->attributes['id'] = $this->id();
		}

		if ( ! empty( $this->struct['attributes'] ) ) {
			$this->attributes = array_merge( $this->attributes, $this->struct['attributes'] );
		}

	}
276450
private function setOutputWrapper(string $wrapper)
    {
        tap($this, function ($instance) use ($wrapper) {
            $this->outputWrapper = $wrapper;
        });
    }
776926
protected static function initAttributeSet()
    {
        $className = get_called_class();
        
        if (!ModelAttributes::attributesSetFor($className)) {
            ModelAttributes::setClassAttributes(
                $className,
                static::attributeSet()
            );
        }
    }
1093375
public function setup() {

		// run parents to setup sanitization filters
		parent::setup();
		if ( isset( $this->struct['value'] ) ) {
			$this->set_value( $this->struct['value'] );
		}
		// base attributes defined
		$this->attributes['name'] = $this->name();
		$this->attributes['id']   = $this->id() . '-control';
	}
1246050
public function setAttribute() : void
    {
        $last = $this->scope->getLastChild(); // Get the last inserted node
        $this->scope->removeLastChild(); // Remove it
        $this->scope->setAttribute($last);
    }
873768
public function setAttributes($attributes, $force = false)
    {
        if ($force) {
            $this->attributes = $attributes;
        } else {
            $this->attributes = array_merge($this->attributes, $attributes);
        }
    }
818140
protected function _initDisclosedAttributes()
    {
        foreach (array_keys(get_class_vars(get_class($this))) as $property) {
            if (substr($property, 0, 1) != '_') {
                $this->_discloseAttr[] = $property;
            }
        }
    }
926647
public function getWrapperAttributes()
    {
        $attributes = [
            'id' => $this->WrapperID,
            'class' => $this->WrapperClass
        ];
        
        $this->extend('updateWrapperAttributes', $attributes);
        
        $attributes = array_merge($attributes, $this->getWrapperDataAttributes());
        
        return $attributes;
    }
1180816
protected function setTagsHints()
	{
		$this->hints['attributeDefaultValue'] = 0;
		$this->hints['namespaces']            = 0;
		foreach ($this->config['tags'] as $tagName => $tagConfig)
		{
			$this->hints['namespaces'] |= (strpos($tagName, ':') !== false);
			$this->setTagAttributesHints($tagConfig);
		}
	}
1213760
public function setAttributes($values)
    {
        if (!is_array($values)) {
            return;
        }
        foreach ($values as $name => $value) {
            $this->$name = $value;
        }
    }
89675
protected function setAttributes ()
	{
		$file 					= $this->file;	
		$this->fileName 		= $file['name'];
		$this->mimeType 	 	= $file['type'];
		$this->tempPath 		= $file['tmp_name'];
		$this->fileError 		= $file['error'];
		$this->fileSize 		= $file['size'];

		$pathParts 				= pathinfo($this->fileName);
		$this->fileExtension  	= isset($pathParts['extension']) ? ".".strtolower($pathParts['extension']) : "";
		$newUniqueName 			= uniqid("", TRUE).$this->fileExtension;
		$this->newFileName 		= Validate::hasValue($this->newFileName) ? $this->newFileName.$this->fileExtension : $newUniqueName;
	}
850679
public function configure()
    {
        $this->items = [];
        $this->layouts = [];
        $this->includes = [];

        $resolver = $this->createResolver();
        $this->params = $resolver->resolve($this->params);

        switch ($this->params['attribute_syntax']) {
            case 'yaml':
                $this->attributeParser = new AttributeParser(AttributeParser::PARSER_YAML);
                break;
            case 'json':
                $this->attributeParser = new AttributeParser(AttributeParser::PARSER_JSON);
                break;
        }
    }
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);
            }

        }
    }
203618
protected function setDataAttributes(Attributes $attributes)
    {
        // add data attributes
        $this->bootstrap_dataAttributes = deserialize($this->bootstrap_dataAttributes, true);

        if (empty($this->bootstrap_dataAttributes)) {
            return;
        }

        foreach ($this->bootstrap_dataAttributes as $attribute) {
            if (trim($attribute['value']) != '' && $attribute['name'] != '') {
                $attributes->setAttribute('data-' . $attribute['name'], $attribute['value']);
            }
        }
    }
311136
protected function updateStyleAttribute()
    {
        $this->styleString = $this->buildStyleString();

        $this->element->setAttribute('style', $this->styleString);
    }
983796
def assign_attributes(attrs, initial_setup = false, skip_changes = false)
      attrs = wrap_values(attrs)

      if attrs
        # When doing a mass-assign, we don't validate or save until the end.
        if initial_setup || skip_changes
          Model.no_change_tracking do
            assign_all_attributes(attrs, skip_changes)
          end
        else
          assign_all_attributes(attrs)
        end
      else
        # Assign to empty
        @attributes = {}
      end

      # Trigger and change all
      @deps.changed_all!
      @deps = HashDependency.new

      run_initial_setup(initial_setup)
    end
986811
public function set_attributes() {

		$this->attributes += array(
			'data-modal'   => $this->id(),
			'data-content' => '#' . $this->id() . '-tmpl',
			'data-margin'  => 12,
			'data-element' => 'form',
			'data-width'   => '480',
			'data-height'  => '550',
			'class'        => 'button',
		);
		$this->set_modal_size();
		$this->set_modal_config();
		if ( ! empty( $this->struct['description'] ) ) {
			$this->attributes['data-title'] = $this->struct['description'];
			unset( $this->struct['description'] );
		}
		if ( ! empty( $this->struct['attributes'] ) ) {
			$this->attributes = array_merge( $this->attributes, $this->struct['attributes'] );
		}
	}