Open

@param array $input
@return array
963618
public function open(array $input) : array {
		$input[\Object\Form\Parent2::BUTTON_SUBMIT_SAVE] = true;
		$input[\Object\Form\Parent2::BUTTON_SUBMIT_OPEN] = true;
		$this->form->form_object->addInput($input);
		$this->form->form_object->process();
		return $this->form->form_object->apiResult();
	}
1066741
private function processPageParams(array $input)
    {
        if (!empty($input['page']) && is_numeric($input['page'])) {
            $this->page = $input['page'];
        }
        if (!empty($input['per_page']) && is_numeric($input['per_page'])) {
            $this->perPage = $input['per_page'];
        }
        return $input;
    }
544007
protected function fillArrayInput(array $input, $default = 0)
    {
        if (empty($input)) {
            return [];
        }

        $res = array_fill($default, max(array_keys($input)), null);

        foreach ($input as $index => $value) {
            $res[$index] = $value;
        }

        return $res;
    }
144610
public function temporaryPost(array $input) : array {
		$input[\Object\Form\Parent2::BUTTON_SUBMIT_SAVE] = true;
		$input[\Object\Form\Parent2::BUTTON_SUBMIT_TEMPORARY_POST] = true;
		$this->form->form_object->addInput($input);
		$this->form->form_object->process();
		return $this->form->form_object->apiResult();
	}
723079
protected function handleFileDelete(array $input = [])
    {
        if (array_key_exists(Field::FILE_DELETE_FLAG, $input)) {
            $input[Field::FILE_DELETE_FLAG] = $input['key'];
            unset($input['key']);
        }

        Input::replace($input);

        return $input;
    }
832052
public function import($input)
    {
        if (false !== ($array = $this->getImportableArray($input))) {
            $this->input = array_replace_recursive($this->input, $array);
            $this->cache = [];
        }
    }
63751
protected function prepareInputFilesForParsing(array $input = [])
    {
        $parse = [];
        foreach ($input as $in) {
            $less = realpath(WWW_ROOT . $in);
            // If we have plugin notation (Plugin.less/file.less)
            // ensure to properly load the files
            list($plugin, $basefile) = $this->_View->pluginSplit($in, false);
            if (!empty($plugin)) {
                $less = realpath(Plugin::path($plugin) . 'webroot' . DS . $basefile);

                if ($less !== false) {
                    $parse[$less] = $this->assetBaseUrl($plugin, $basefile);
                    continue;
                }
            }
            if ($less !== false) {
                $parse[$less] = '';
                continue;
            }
            // Plugins without plugin notation (/plugin/less/file.less)
            list($plugin, $basefile) = $this->assetSplit($in);
            if ($file = $this->pluginAssetFile([$plugin, $basefile])) {
                $parse[$file] = $this->assetBaseUrl($plugin, $basefile);
                continue;
            }

            // Will probably throw a not found error
            $parse[$in] = '';
        }

        return $parse;
    }
837529
private static function reorderOutput($input)
    {
        $paymentMethods = array();

        $basePath = $input['service']['basePath'];

        foreach ((array)$input['countryOptionList'] as $country) {
            foreach ((array)$country['paymentOptionList'] as $paymentOption) {
                if (isset($paymentMethods[$paymentOption['id']])) {
                    $paymentMethods[$paymentOption['id']]['countries'][] = $country['id'];
                    continue;
                }

                $banks = array();
                if (!empty($paymentOption['paymentOptionSubList'])) {
                    foreach ((array)$paymentOption['paymentOptionSubList'] as $optionSub) {
                        $image = '';
                        if ($paymentOption['id'] == 10) {// only add images for ideal, because the rest will not have images
                            $image = $basePath.$optionSub['path'].$optionSub['img'];
                        }
                        $banks[] = array(
                          'id' => $optionSub['id'],
                          'name' => $optionSub['name'],
                          'visibleName' => $optionSub['visibleName'],
                          'image' => $image,
                        );
                    }
                }
                $paymentMethods[$paymentOption['id']] = array(
                  'id' => $paymentOption['id'],
                  'name' => $paymentOption['name'],
                  'visibleName' => $paymentOption['visibleName'],
                  'countries' => array($country['id']),
                  'banks' => $banks,
                );
            }
        }

        return $paymentMethods;
    }
960090
protected function handleFileDelete(array $input = [])
    {
        if (array_key_exists(Field::FILE_DELETE_FLAG, $input)) {
            $input[Field::FILE_DELETE_FLAG] = $input['key'];
            unset($input['key']);
        }

        request()->replace($input);

        return $input;
    }
651212
protected function cleanArray($input)
	{
		// add to the cleaned list when object
		if (is_object($input))
		{
			$this->parent->isClean($input);
		}

		foreach ($input as $k => $v)
		{
			$input[$k] = $this->clean($v);
		}

		return $input;
	}
49224
public static function createFromArray(array $input)
    {
        if (!empty($input['empty'])) {
            return static::createEmpty();
        }
        foreach (['lower', 'upper', 'lowerInclusive', 'upperInclusive'] as $key) {
            if (array_key_exists($key, $input)) {
                return new static(
                    array_key_exists('lower', $input) ? $input['lower'] : null,
                    array_key_exists('upper', $input) ? $input['upper'] : null,
                    array_key_exists('lowerInclusive', $input) ? $input['lowerInclusive'] : true,
                    array_key_exists('upperInclusive', $input) ? $input['upperInclusive'] : false
                );
            }
        }
        return new static(array_shift($input), array_shift($input));
    }
976648
public function parseManyFromArray( array $input )
    {
        $items = array();
        foreach ($input as $itemArray)
        {
            $items[] = $this->parseOneFromArray($itemArray);
        }

        return $items;
    }
837562
private function load($input) {
		$Source = $this->loadFromSource($input);
		if (empty ($Source)) return array();
		$this->path = array();
		$this->result = array();


		for ($i = 0; $i < count($Source); $i++) {
			$line = $Source[$i];
			$lineIndent = $this->_getIndent($line);
			$this->path = $this->getParentPathByIndent($lineIndent);
			$line = $this->stripIndent($line, $lineIndent);
			if ($this->isComment($line)) continue;

			if ($literalBlockStyle = $this->startsLiteralBlock($line)) {
				$line = rtrim ($line, $literalBlockStyle . "\n");
				$literalBlock = '';
				$line .= $this->LiteralPlaceHolder;

				while ($this->literalBlockContinues($Source[++$i], $lineIndent)) {
					$literalBlock = $this->addLiteralLine($literalBlock, $Source[$i], $literalBlockStyle);
				}
				$i--;
			}
			$lineArray = $this->_parseLine($line);
			if ($literalBlockStyle)
			$lineArray = $this->revertLiteralPlaceHolder ($lineArray, $literalBlock);

			$this->addArray($lineArray, $lineIndent);
		}
		return $this->result;
	}
548111
public function post(array $input) : array {
		$input[\Object\Form\Parent2::BUTTON_SUBMIT_SAVE] = true;
		$input[\Object\Form\Parent2::BUTTON_SUBMIT_POST] = true;
		$this->form->form_object->addInput($input);
		$this->form->form_object->process();
		return $this->form->form_object->apiResult();
	}
131105
protected function convertArrayToSnakeCase(array $input):array
    {
        $converted = [];

        foreach ($input as $key => $value) {
            $converted[snake_case($key)] = $value;
        }

        return $converted;
    }
441432
public function onlyFillable(array $input)
    {
        $result = array_intersect_key($input, array_flip($this->modelInstance->getFillable()));

        foreach ($this->avoidEmptyUpdate as $avoid) {
            if (array_key_exists($avoid, $result) && empty($result[$avoid])) {
                unset($result[$avoid]);
            }
        }

        return $result;
    }
221737
public function execute(array $input) : array {
		$this->form->form_object->addInput($input);
		$this->form->form_object->process();
		return $this->form->form_object->apiResult();
	}