@param \Enm\Transformer\Entities\Parameter[] $array
@param bool                                  $edit

@throws Exceptions\TransformerException
359215
public function setParams(array $array, $edit = false)
  {
    if (is_array($this->param_array))
    {
      if ($edit === false)
      {
        throw new Exceptions\TransformerException('Param-Array already defined!');
      }
      else
      {
        $this->param_edited = true;
      }
    }
    $this->param_array = $array;
  }
1032295
public function copyFromArray(array &$array)
    {
        parent::copyFromArray($array);

        // action
        $this->setAction(
            TokenAction::valueOf(
                LanguageUtility::getFromArray('action', $array)));

        // responseContent
        $this->setResponseContent(
            LanguageUtility::getFromArray('responseContent', $array));

        // username
        $this->setUsername(
            LanguageUtility::getFromArray('username', $array));

        // password
        $this->setPassword(
            LanguageUtility::getFromArray('password', $array));

        // ticket
        $this->setTicket(
            LanguageUtility::getFromArray('ticket', $array));

        // accessToken
        $this->setAccessToken(
            LanguageUtility::getFromArray('accessToken', $array));

        // accessTokenExpiresAt
        $this->setAccessTokenExpiresAt(
            LanguageUtility::getFromArray('accessTokenExpiresAt', $array));

        // accessTokenDuration
        $this->setAccessTokenDuration(
            LanguageUtility::getFromArray('accessTokenDuration', $array));

        // refreshToken
        $this->setRefreshToken(
            LanguageUtility::getFromArray('refreshToken', $array));

        // refreshTokenExpiresAt
        $this->setRefreshTokenExpiresAt(
            LanguageUtility::getFromArray('refreshTokenExpiresAt', $array));

        // refreshTokenDuration
        $this->setRefreshTokenDuration(
            LanguageUtility::getFromArray('refreshTokenDuration', $array));

        // idToken
        $this->setIdToken(
            LanguageUtility::getFromArray('idToken', $array));

        // grantType
        $this->setGrantType(
            GrantType::valueOf(
                LanguageUtility::getFromArray('grantType', $array)));

        // clientId
        $this->setClientId(
            LanguageUtility::getFromArray('clientId', $array));

        // clientIdAlias
        $this->setClientIdAlias(
            LanguageUtility::getFromArray('clientIdAlias', $array));

        // clientIdAliasUsed
        $this->setClientIdAliasUsed(
            LanguageUtility::getFromArrayAsBoolean('clientIdAlias', $array));

        // subject
        $this->setSubject(
            LanguageUtility::getFromArray('subject', $array));

        // scopes
        $this->setScopes(
            LanguageUtility::getFromArray('scopes', $array));

        // properties
        $properties = LanguageUtility::getFromArray('properties', $array);
        $this->setProperties(
            LanguageUtility::convertArrayToArrayOfArrayCopyable(
                $properties, __NAMESPACE__ . '\Property'));
    }
510947
protected function renderDataTable($array, $prefixLine = "")
    {
        $columnsHaveInvalidChars = $this->areTableLabelsInvalidXmlTagNames(reset($array));

        $out = '';
        foreach ($array as $rowId => $row) {
            if (!is_array($row)) {
                $value = self::formatValueXml($row);
                if (strlen($value) == 0) {
                    $out .= $prefixLine . "\t\t<$rowId />\n";
                } else {
                    $out .= $prefixLine . "\t\t<$rowId>" . $value . "</$rowId>\n";
                }
                continue;
            }

            // Handing case idgoal=7, creating a new array for that one
            $rowAttribute = '';
            if (strstr($rowId, '=') !== false) {
                $rowAttribute = explode('=', $rowId);
                $rowAttribute = " " . $rowAttribute[0] . "='" . $rowAttribute[1] . "'";
            }
            $out .= $prefixLine . "\t<row$rowAttribute>";

            if (count($row) === 1
                && key($row) === 0
            ) {
                $value = self::formatValueXml(current($row));
                $out .= $prefixLine . $value;
            } else {
                $out .= "\n";
                foreach ($row as $name => $value) {
                    // handle the recursive dataTable case by XML outputting the recursive table
                    if (is_array($value)) {
                        if (is_array(reset($value))) {
                            $value = "\n" . $this->renderDataTable($value, $prefixLine . "\t\t");
                        } else {
                            $value = "\n" . $this->renderArray($value, $prefixLine . "\t\t");
                        }
                        $value .= $prefixLine . "\t\t";
                    } else {
                        $value = self::formatValueXml($value);
                    }

                    list($tagStart, $tagEnd) = $this->getTagStartAndEndFor($name, $columnsHaveInvalidChars);

                    if (strlen($value) == 0) {
                        $out .= $prefixLine . "\t\t<$tagStart />\n";
                    } else {
                        $out .= $prefixLine . "\t\t<$tagStart>" . $value . "</$tagEnd>\n";
                    }
                }
                $out .= "\t";
            }
            $out .= $prefixLine . "</row>\n";
        }
        return $out;
    }
171995
public function copyFromArray(array &$array)
    {
        // key
        $this->setKey(
            LanguageUtility::getFromArray('key', $array));

        // value
        $this->setValue(
            LanguageUtility::getFromArray('value', $array));

        // hidden
        $this->setHidden(
            LanguageUtility::getFromArrayAsBoolean('hidden', $array));
    }
595040
public function add($parameter, array $array)
    {

        if (!isset($this->$parameter)) {
            throw new \Exception("Supplied variable doesn't exist");
        }
        $array[$this->callingClassWithoutNamespace()] = $this;
        $up = ucfirst($parameter);
        $object = (dirname(get_class()) . "\\" . $up);
        $object = new $object();
        if (!$object instanceof ArraySerialize) {
            throw new \Exception("Object supplied not serialisable");
        }
        /** @var $object ToArray */
        $object->fromArray($array, $object);
        unset($array[$this->callingClassWithoutNamespace()]);
        $this->$parameter->add($object);
    }
269952
public function copyToArray(array &$array)
    {
        $array['name']         = $this->name;
        $array['defaultEntry'] = $this->defaultEntry;
        $array['description']  = $this->description;
        $array['descriptions'] = LanguageUtility::convertArrayOfArrayCopyableToArray($this->descriptions);
        $array['attributes']   = LanguageUtility::convertArrayOfArrayCopyableToArray($this->attributes);
    }
680427
public function createForm(bool $edit = false)
    {
        $form = [
            'storageURL' => route('admin.api.pages'),
            'buttons'    => [
                [
                    "class" => "col-centered",
                    "label" => trans('HCTranslations::core.buttons.submit'),
                    "type"  => "submit",
                ],
            ],
            'structure'  => [
                [
                    "type"            => "radioList",
                    "fieldID"         => "type",
                    "tabID"           => trans("Page"),
                    "label"           => trans("HCPages::pages.type"),
                    "required"        => 1,
                    "requiredVisible" => 1,
                    "options"         => HCPages::getTableEnumList('type', 'label'),
                ],
                [
                    "type"            => "resource",
                    "fieldID"         => "cover_photo_id",
                    "tabID"           => trans("Page"),
                    "uploadURL"       => route("admin.api.resources"),
                    "viewURL"         => route("resource.get", ['/']),
                    "label"           => trans("HCPages::pages.cover_photo_id"),
                    "fileCount"       => 1,
                ], [
                    "type"            => "dropDownList",
                    "fieldID"         => "categories",
                    "tabID"           => trans ("Page"),
                    "label"           => trans ("HCPages::pages.categories"),
                    "options"         => HCPagesCategories::with ('translations')->get (),
                    "search"          => [
                        "showNodes" => ['translations.{lang}.title'],
                        "minimumSelectionLength" => 1,
                    ]
                ], [
                    "type"            => "dateTimePicker",
                    "properties"      => [
                        "format" => "YYYY-MM-DD HH:mm:ss",
                    ],
                    "fieldID"         => "publish_at",
                    "tabID"           => trans("Page"),
                    "label"           => trans("HCPages::pages.publish_at"),
                ], [
                    "type"            => "resource",
                    "fieldID"         => "translations.cover_photo_id",
                    "tabID"           => trans("HCTranslations::core.translations"),
                    "uploadURL"       => route("admin.api.resources"),
                    "viewURL"         => route("resource.get", ['/']),
                    "label"           => trans("HCPages::pages.cover_photo_id"),
                    "fileCount"       => 1,
                    "multiLanguage"   => 1,
                ], [
                    "type"            => "singleLine",
                    "fieldID"         => "translations.title",
                    "tabID"           => trans("HCTranslations::core.translations"),
                    "label"           => trans("HCPages::pages.title"),
                    "required"        => 1,
                    "requiredVisible" => 1,
                    "multiLanguage"   => 1,
                ], [
                    "type"            => "singleLine",
                    "fieldID"         => "translations.summary",
                    "tabID"           => trans("HCTranslations::core.translations"),
                    "label"           => trans("HCPages::pages.summary"),
                    "multiLanguage"   => 1,
                ], [
                    "type"            => "richTextArea",
                    "fieldID"         => "translations.content",
                    "tabID"           => trans("HCTranslations::core.translations"),
                    "label"           => trans("HCPages::pages.content"),
                    "multiLanguage"   => 1,
                ],
            ],
        ];

        formManagerSeo($form, $this->multiLanguage);

        /*$form['structure'][] = [
            "type"            => "dropDownList",
            "fieldID"         => "userGroups",
            "tabID"           => trans("HCTranslations::core.ownership"),
            "label"           => trans ("HCTranslations::core.groups"),
            "options"         => HCGroups::get(),
            "search"          => [
                "showNodes" => ['label']
            ]
        ];

        $form['structure'][] = [
            "type"            => "dropDownList",
            "fieldID"         => "users",
            "tabID"           => trans("HCTranslations::core.ownership"),
            "label"           => trans ("HCTranslations::core.users"),
            "options"         => HCUsers::get(),
            "search"          => [
                "showNodes" => ['email'],
                "tabs"      => true
            ]
        ];*/

        if ($this->multiLanguage)
            $form['availableLanguages'] = getHCContentLanguages();

        if (!$edit)
            return $form;

        //Make changes to edit form if needed

        $form['structure'][] = [
            "type"          => "singleLine",
            "fieldID"       => "translations.slug",
            "tabID"         => trans("HCTranslations::core.translations"),
            "label"         => trans("HCPages::pages.slug"),
            "readonly"      => 1,
            "multiLanguage" => 1,
        ];

        return $form;
    }
116863
private function setXmlrpcType(&$array)
    {
        foreach ($array as $key => $element) {
            if (is_a($element, '\DateTime')) {
                $array[$key] = $element->format("Ymd\TH:i:sO");
                xmlrpc_set_type($array[$key], 'datetime');
            } elseif (is_array($element)) {
                $this->setXmlrpcType($array[$key]);
            }
        }
    }
202041
public function copyToArray(array &$array)
    {
        parent::copyToArray($array);

        $array['action']       = LanguageUtility::toString($this->action);
        $array['grantType']    = LanguageUtility::toString($this->grantType);
        $array['clientId']     = $this->clientId;
        $array['subject']      = $this->subject;
        $array['scopes']       = $this->scopes;
        $array['accessToken']  = $this->accessToken;
        $array['tokenType']    = $this->tokenType;
        $array['expiresIn']    = LanguageUtility::orZero($this->expiresIn);
        $array['expiresAt']    = LanguageUtility::orZero($this->expiresAt);
        $array['refreshToken'] = $this->refreshToken;
        $array['properties']   = LanguageUtility::convertArrayOfArrayCopyableToArray($this->properties);
    }
1291850
protected Object[] _transform(final Object[] array) {
        Object[] result = new Object[array.length];
        for (Object object : array) {
            ArrayUtils.add(result, transform(object));
        }
        return result;
    }
90119
public function createForm(bool $edit = false): array
    {
        $form = [
            'storageUrl' => route('admin.api.regions.continents'),
            'buttons' => [
                'submit' => [
                    'label' => $this->getSubmitLabel($edit),
                ],
            ],
            'structure' => $this->getStructure($edit),
        ];

        if ($this->multiLanguage) {
            $form['availableLanguages'] = getHCContentLanguages();
        }

        return $form;
    }
1241702
private function cloneArray(array &$array): void
    {
        foreach ($array as $key => $value) {
            if (is_object($value)) {
                $array[$key] = clone $value;
            }
            if (is_array($value)) {
                $this->cloneArray($array[$key]);
            }
        }
    }
422046
public static function fromArray($entity, array $array)
    {
        if (is_string($entity)) {
            $entity = InstanceHelper::createInstanceWithoutConstructor($entity);
        }

        $reflectionPropertyList = InstanceHelper::getReflectionProperties($entity);
        ClassHelper::setReflectionPropertiesAccessible($reflectionPropertyList);

        /** @var ReflectionProperty $reflectionProperty */
        foreach ($reflectionPropertyList as $reflectionProperty) {
            $propertyName = $reflectionProperty->getName();
            if (array_key_exists($propertyName, $array)) {
                $reflectionProperty->setValue($entity, $array[$propertyName]);
            }
        }

        return $entity;
    }
1132620
public function copyFromArray(array &$array)
    {
        parent::copyFromArray($array);

        // action
        $this->setAction(
            AuthorizationIssueAction::valueOf(
                LanguageUtility::getFromArray('action', $array)));

        // responseContent
        $this->setResponseContent(
            LanguageUtility::getFromArray('responseContent', $array));
    }
721914
public function copyFromArray(array &$array)
    {
        parent::copyFromArray($array);

        // action
        $this->setAction(
            UserInfoAction::valueOf(
                LanguageUtility::getFromArray('action', $array)));

        // clientId
        $this->setClientId(
            LanguageUtility::getFromArray('clientId', $array));

        // subject
        $this->setSubject(
            LanguageUtility::getFromArray('subject', $array));

        // scopes
        $this->setScopes(
            LanguageUtility::getFromArray('scopes', $array));

        // claims
        $this->setClaims(
            LanguageUtility::getFromArray('claims', $array));

        // token
        $this->setToken(
            LanguageUtility::getFromArray('token', $array));

        // responseContent
        $this->setResponseContent(
            LanguageUtility::getFromArray('responseContent', $array));

        // properties
        $properties = LanguageUtility::getFromArray('properties', $array);
        $this->setProperties(
            LanguageUtility::convertArrayToArrayOfArrayCopyable(
                $properties, __NAMESPACE__ . '\Property'));

        // clientIdAlias
        $this->setClientIdAlias(
            LanguageUtility::getFromArray('clientIdAlias', $array));

        // clientIdAliasUsed
        $this->setClientIdAliasUsed(
            LanguageUtility::getFromArrayAsBoolean('clientIdAlias', $array));
    }
698853
public function cp(array &$array, string $from, string $to): void
    {
        // If $from is not readable
        if (false === $this->pa->isReadable($array, $from)) {
            throw new AccessException(sprintf('The $from path "%s" isn\'t readable.', $from));
        }

        // Get the value to move
        $value = $this->getValue($array, $from);

        // Check if $to is the root and if it is
        if ($this->isRoot($to)) {
            // Merge the value in the passed $array
            $array = array_merge($array, $this->forceArray($value));

            return;
        }

        // Do the copy
        $this->pa->setValue($array, $to, $value);
    }
613996
private function getRevisionsFromResult( $array ) {
		$revisions = new Revisions();
		$pageid = $array['pageid'];
		foreach ( $array['revisions'] as $revision ) {
			$revisions->addRevision(
				new Revision(
					$this->getContent( $array['contentmodel'], $revision['*'] ),
					new PageIdentifier( new Title( $array['title'], $array['ns'] ), $pageid ),
					$revision['revid'],
					new EditInfo(
						$revision['comment'],
						array_key_exists( 'minor', $revision ),
						array_key_exists( 'bot', $revision )
					),
					$revision['user'],
					$revision['timestamp']
				)
			);
		}

		return $revisions;
	}