Returns a new instance of this TextProvider.

@param array $properties

@return self
336576
protected function replicate(array $properties=[])
    {
        $class = get_class($this);
        $domain = isset($properties['domain']) ? $properties['domain'] : $this->domain;
        $namespace = isset($properties['namespace']) ? $properties['namespace'] : $this->namespace;

        return new $class($this->translator, $domain, $namespace, false);
    }
328184
public function setProperties(array $properties = null)
    {
        ValidationUtility::ensureNullOrArrayOfType(
            '$properties', $properties, __NAMESPACE__ . '\Property');

        $this->properties = $properties;

        return $this;
    }
908974
protected function setForeignRelationFromArray(array $properties)
    {
        if (Helpers::isKeyExists($properties, 'is-foreign-relation') && !$properties['is-foreign-relation']) {
            return $this;
        }

        $relation = ForeignRelationship::predict($this->name, Helpers::getModelsPath());

        if (Helpers::isKeyExists($properties, 'foreign-relation')) {
            $relation = ForeignRelationship::get((array) $properties['foreign-relation']);

            if (!is_null($relation)) {
                $this->setOnStore($properties);
                $this->setOnUpdate($properties);
            }

        } else if (Helpers::isKeyExists($properties, 'foreign-constraint')) {
            $constraint = $this->getForeignConstraintFromArray((array) $properties);

            if (!is_null($constraint)) {
                $relation = $constraint->getForeignRelation();
            }
        }

        $this->setForeignRelation($relation);

        return $this;
    }
1183270
public function from($collection, $properties = null) {
		$this->_collection = $collection;
		
		if (is_string($properties) || is_array($properties)) {
			$this->_properties = (array) $properties;
		}
		
		return $this;
	}
1029670
protected function setupOne(array $properties) {
        $pkName = $this->pkName;
        /** @var Column $column */
        foreach ($this->tableSchema->columns as $column) {
            if (!array_key_exists($column->name, $properties)) {
                continue;
            }

            if (null !== $properties[$column->name]) {
                if ($column->isInt()) {
                    $this->_properties[$column->name] =
                        (int) $properties[$column->name];
                } else if ($column->isFloat()) {
                    $this->_properties[$column->name] =
                        (float) $properties[$column->name];
                } else {
                    $this->_properties[$column->name] =
                        $properties[$column->name];
                }
            } else {
                $this->_properties[$column->name] = null;
            }
        }
        $this->_modified = array();
        $this->_oldPK = $this->_properties[$pkName] ?? null;
        return $this;
    }
850937
public function setProperties(array $properties)
	{
		foreach($properties as $key=>$value)
			$this->parseProperty($key, $value);

		return $this;
	}
91188
public function setProperties(array $properties)
    {
        foreach ($properties as $propertyIdent => $propertyMetadata) {
            if (isset($this->properties[$propertyIdent])) {
                $this->properties[$propertyIdent] = array_replace_recursive(
                    $this->properties[$propertyIdent],
                    $propertyMetadata
                );
            } else {
                $this->properties[$propertyIdent] = $propertyMetadata;
            }
        }

        return $this;
    }
561001
public function withProperty(string $property, $value): self
    {
        return new self(
            $this->class,
            $this->properties->put($property, $value),
            $this->injectionStrategy,
            $this->instanciator
        );
    }
652847
public function newModelInstance($attributes = [])
    {
        return \tap(parent::newModelInstance($attributes), function ($model) {
            $model->setTenantor($this->tenantor);
        });
    }
765954
public function setProperties(array $properties) {
		foreach ($this->properties as $prop) {
			$prop->setParent(null);
		}

		$this->properties->clear();

		foreach ($properties as $prop) {
			$this->setProperty($prop);
		}

		return $this;
	}
750599
public function FieldHolder($properties = array())
    {
        $context = $this;

        if (count($properties)) {
            $context = $this->customise($properties);
        }

        return $context->renderWith($this->getTemplates());
    }
1235572
final public static function getInstance(?array $configurations = null): self
    {
        if (is_null(self::$instance)) {
            self::$instance = new self($configurations);
        }
        return self::$instance;
    }
525352
public static function make($properties)
    {
        $instance = new self();
        foreach ($properties as $item) {
            $instance->append(
                Property::make($item)
            );
        }

        return $instance;
    }
770008
public function FieldHolder($properties = array())
    {
        if ($this->content instanceof ViewableData) {
            $context = $this->content;

            if ($properties) {
                $context = $context->customise($properties);
            }

            return $context->forTemplate();
        }

        return $this->content;
    }
612895
protected function setPlaceholder(array $properties)
    {
        $labels = $this->getPlaceholderFromArray($properties);

        foreach ($labels as $label) {
            $this->addPlaceholder($label->text, $label->isPlain, $label->lang);
        }

        return $this;
    }
197632
public function FieldHolder($properties = array())
    {
        $obj = $properties ? $this->customise($properties) : $this;

        return $obj->renderWith($this->getTemplates());
    }
27805
protected function getPlaceholderFromArray(array $properties)
    {
        if (isset($properties['placeholder']) && !empty($properties['placeholder'])) {
            if (is_array($properties['placeholder'])) {
                //At this point we know this the label
                return $this->getLabelsFromArray($properties['placeholder']);
            }

            return [
                new Label($properties['placeholder'], $this->localeGroup, true, $this->defaultLang),
            ];
        }

        return [];
    }