@param array $properties

@return string
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;
    }
1359573
public function getPageProperties($properties = array())
    {
        $success = 0;
        $data    = array();

        $page = $this->getServiceLocator()->get("MelisPageProperty");

        if(is_array($property))
        {
            $data = $page->getPageProperties($properties);
        }

        return $data;
    }
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;
    }
835595
protected static function compile_properties(array $properties, $defaults = true)
	{
		$p = $properties;
		$properties = [];

		foreach ($p as $key => $value)
		{
			if (is_int($key))
			{
				$key = $value;
				$value = [];
			}

			// Get property defaults
			if ($defaults and $property = static::property($key, false))
			{
				$value = array_replace_recursive($property, $value);
			}

			$properties[$key] = $value;
		}

		return $properties;
	}
429561
public function toArray($properties = null)
    {
        $array = [];

        if (!empty($this->getMeta())) {
            $array['meta'] = $this->getMeta();
        }

        if (!empty($this->getPropertyContainer())) {
            $array['properties'] = [];

            foreach ($this->getPropertyContainer()->getProperties() as $item) {
                if (method_exists(
                    $item,
                    'toArray'
                )) {
                    $array['properties'][] = $item->toArray();
                }
            }
        }
        if (!empty($this->getDatabaseContainer())) {
            $array['database'] = $this->getDatabaseContainer()->getDatabase()->toArray();
        }

        return $array;
    }
833125
protected function keyOr(string $property): string
    {
        return $this->key ? $this->key->find() : $property;
    }
527770
public function decodeProperties($properties)
	{
		// Compose components to objects
		foreach ($this->composed_properties as $property => $components) {
			$value = array();
			foreach ($components as $component => $column) {
				$value[$component] = isset($properties[$column]) ? $properties[$column] : null;
			}
			$properties[$property] = $value;
		}

		// Decode JSON columns
		foreach ($this->json_columns as $column_name) {
			if (isset($properties[$column_name])) {
				$properties[$column_name] = json_decode($properties[$column_name], TRUE, 512, JSON_BIGINT_AS_STRING);
			}
		}
		return $properties;
	}
303775
public function Field($properties = array())
    {
        $options = array();

        foreach ($this->getOptions()->filter('Selected', true) as $option) {
            $options[] = $option->Title;
        }

        $field = ReadonlyField::create($this->name . '_Readonly', $this->title);

        $field->setForm($this->form);
        $field->setValue(implode(', ', $options));
        return $field->Field();
    }
829521
protected function validateRequired(array $properties)
    {
        $valid = true;
        foreach ($properties as $property) {
            $value = $this->getPropertyValue($property);
            if (empty($value)) {
                $this->addError($property, sprintf('Property "%s" must not be empty.', $property));
                $valid = false;
            }
        }
        return $valid;
    }
392171
public static function property($property = null)
	{
		$property = strtolower($property);
		return array_key_exists($property, static::$properties) ? static::$properties[$property] : null;
	}
718325
protected function toHeader($name, array $properties)
    {
        $result = urlencode($name) . '=' . urlencode($properties['value']);
        if (isset($properties['domain'])) {
            $result .= '; domain=' . $properties['domain'];
        }
        if (isset($properties['path'])) {
            $result .= '; path=' . $properties['path'];
        }
        if (isset($properties['expires'])) {
            if (is_string($properties['expires'])) {
                $timestamp = strtotime($properties['expires']);
            } else {
                $timestamp = (int)$properties['expires'];
            }
            if ($timestamp !== 0) {
                $result .= '; expires=' . gmdate('D, d-M-Y H:i:s e', $timestamp);
            }
        }
        if (isset($properties['secure']) && $properties['secure']) {
            $result .= '; secure';
        }
        if (isset($properties['httponly']) && $properties['httponly']) {
            $result .= '; HttpOnly';
        }
        return $result;
    }
159400
protected function buildContext($properties)
    {
        if (!is_array($properties) || !$properties) {
            return [];
        }

        $extended = [];
        foreach ($properties as $k => $prop) {
            $extended[$k] = $this->sanitizeString($prop);
        }

        return $extended;
    }
1327689
public function flat(array $properties): string
    {
        Assert::isMap($properties);

        return $this->arrayImploder->byGlue($properties, ';', ':');
    }
240528
private function guessType(array $properties)
    {
        $types = ['url', 'route', 'action'];

        foreach ($types as $type) {
            if (array_key_exists($type, $properties)) return $type;
        }

        return null;
    }
61702
public function Field($properties=array()) {
        $siteKey=$this->getSiteKey();
        $secretKey=$this->_secretKey ? $this->_secretKey : self::config()->secret_key;

        if(empty($siteKey) || empty($secretKey)) {
            user_error('You must configure Nocaptcha.site_key and Nocaptcha.secret_key, you can retrieve these at https://google.com/recaptcha', E_USER_ERROR);
        }

        Requirements::javascript('undefinedoffset/silverstripe-nocaptcha:javascript/NocaptchaField.js');
        Requirements::customScript(
            "var _noCaptchaFields=_noCaptchaFields || [];_noCaptchaFields.push('".$this->ID()."');",
            "NocaptchaField-" . $this->ID()
        );
        Requirements::customScript(
            "(function() {\n" .
                "var gr = document.createElement('script'); gr.type = 'text/javascript'; gr.async = true;\n" .
                "gr.src = ('https:' == document.location.protocol ? 'https://www' : 'http://www') + " .
                "'.google.com/recaptcha/api.js?render=explicit&hl=" .
                Locale::getPrimaryLanguage(i18n::get_locale()) .
                "&onload=noCaptchaFieldRender';\n" .
                "var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gr, s);\n" .
            "})();\n",
            'NocaptchaField-lib'
        );

        return parent::Field($properties);
    }
456712
protected function convertPropertiesToQueryArray(PropertiesInterface $properties)
    {
        $propertiesArray = [];

        $propertyCounter = 0;
        $propertiesArray[Constants::CONTROL_PROP_ID] = [];
        $propertiesArray[Constants::CONTROL_PROP_VALUE] = [];
        foreach ($properties->getProperties() as $property) {
            $propertiesArray[Constants::CONTROL_PROP_ID][$propertyCounter] = $property->getId();

            $propertyValues = $property->getValues();

            if (count($propertyValues) === 1) {
                $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter] =
                    $this->convertPropertyValueToSimpleType(
                        $property->getFirstValue()
                    );
            } elseif (count($propertyValues) > 1) {
                $propertyValueCounter = 0;
                $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter] = [];
                foreach ($propertyValues as $propertyValue) {
                    $propertiesArray[Constants::CONTROL_PROP_VALUE][$propertyCounter][$propertyValueCounter] =
                        $this->convertPropertyValueToSimpleType(
                            $propertyValue
                        );
                    $propertyValueCounter ++;
                }
            }

            $propertyCounter ++;
        }

        return $propertiesArray;
    }
903228
public function sets(array $properties)
  {
    foreach($properties as $k => $v){
      $this->set($k, $v);
    }
    return $this;
  }