Retrieves data from the form data
@param object $formdata data submited with the form
@return mixed array filter data or false when filter not set
778242
public function check_data($formdata) {
        $field    = $this->_name;
        $operator = $field.'_op';

        if (array_key_exists($operator, $formdata)) {
            if ($formdata->$operator != 5 and $formdata->$field == '') {
                // No data - no change except for empty filter.
                return false;
            }
            // If field value is set then use it, else it's null.
            $fieldvalue = null;
            if (isset($formdata->$field)) {
                $fieldvalue = $formdata->$field;
            }
            return array('operator' => (int)$formdata->$operator, 'value' => $fieldvalue);
        }

        return false;
    }
753520
public static function filterListData($objectData, $filters = array())
    {
        $result = array();
        foreach ($objectData as $fieldData) {
            $filteredItems = array();
            //====================================================================//
            // Ensure Item is An Array of Fields
            if (!is_array($fieldData) && !($fieldData instanceof ArrayObject)) {
                continue;
            }
            //====================================================================//
            // Convert ArrayObjects to Array
            if ($fieldData instanceof ArrayObject) {
                $fieldData = $fieldData->getArrayCopy();
            }
            //====================================================================//
            // Search for Field in Item Block
            foreach ($filters as $fieldId) {
                if (array_key_exists($fieldId, $fieldData)) {
                    $filteredItems[$fieldId] = $fieldData[$fieldId];
                }
            }
            $result[] = $filteredItems;
        }

        return $result;
    }
1038732
protected function encodeData($serializedData)
    {
        $result = json_encode($serializedData);
        if ($result === false) {
            $errorCode = json_last_error();
            throw new JsonException("Failed serialize json.", $errorCode);
        }

        return $result;
    }
10480
public function getData()
	{
		$data = $this->data;

		foreach ($data as $key => $value)
		{
			if (is_object($value) and $this->isWhitelisted($value))
			{
				continue;
			}

			if ($this->shouldBeFiltered($key))
			{
				if ($value instanceof Sanitize)
				{
					$data[$key] = $value->sanitize();
				}
				else
				{
					$data[$key] = $this->filter($value);
				}
			}
		}

		return $data;
	}
1057284
public static function hydrateLayoutConfigFlexFormData($flexFormData): array
    {
        $dataStructure = $flexFormData;
        if (is_string($flexFormData)) {
            $dataStructure = GeneralUtility::xml2array($flexFormData);
        }

        // Level: FlexForm Sheets
        return array_map(function ($sheet) {
            // Level: FlexForm Sheet Fields
            return array_map(function ($field) {
                // Level: FlexForm Field
                return $field['vDEF'];
            }, $sheet['lDEF']);
        }, $dataStructure['data']);
    }
1113235
public function getQueryArgs($formValue)
    {
        // TODO: Implement getQueryArgs() method.
        $arr = [];
        if (is_array($formValue) && !empty($formValue)) {
            $arr = $formValue;
        }

        if (is_string($formValue) && !empty($formValue)) {
            $arr = array_filter(explode(',', $formValue));
        }

        return [$this->field, $arr];
    }
457861
public function tryToLogin($formData)
    {
        $login    = array_key_exists($this->loginColumn, $formData) ? trim($formData[$this->loginColumn])
                : '';
        $password = array_key_exists($this->passwordColumn, $formData) ? trim($formData[$this->passwordColumn])
                : '';
        if (!$login) {
            $this->addStatusMessage(_('missing login'), 'error');

            return;
        }
        if (!$password) {
            $this->addStatusMessage(_('missing password'), 'error');

            return;
        }

        $result = $this->kontakt->authenticate($login, $password);
        if ($result === true) {
            $this->kontakt->defaultUrlParams['detail'] = 'full';
            $contactId                                 = $this->kontakt->loadFromFlexiBee([
                $this->loginColumn => $login]);
            if (is_array($contactId)) {
                $this->addStatusMessage(sprintf(_('Multiplete ContactID'),
                        serialize($contactId)), 'warning');
                $contactId = current($contactId);
                $this->addStatusMessage(_('Using the first one'));
            }

            $firma = $this->kontakt->getDataValue('firma');
            $this->adresar->loadFromFlexiBee(['id' => $firma]);

            $this->addStatusMessage($firma.' '.$this->adresar->getDataValue('nazev'));

            $result = $this->loginSuccess();
        }
        return $result;
    }
478860
public function getData() {
        $values = array_filter(filter_input_array(INPUT_POST));
        foreach ($values as $key => $value) {
            if ( is_array($value) )  {
                $values[$key] = array_filter($value);
            }
        }

        return $values + $_FILES;
    }
1195289
protected function build_limitcourseids(\stdClass $formdata) {
        $limitcourseids = false;

        if (!empty($formdata->mycoursesonly)) {
            $limitcourseids = array_keys($this->get_my_courses(false));
        }

        if (!empty($formdata->courseids)) {
            if (empty($limitcourseids)) {
                $limitcourseids = $formdata->courseids;
            } else {
                $limitcourseids = array_intersect($limitcourseids, $formdata->courseids);
            }
        }

        return $limitcourseids;
    }
538672
protected function getUpdateEvent($formData)
    {
        $updateEvent = new FolderUpdateEvent($formData['id']);

        $updateEvent
            ->setLocale($formData['locale'])
            ->setTitle($formData['title'])
            ->setChapo($formData['chapo'])
            ->setDescription($formData['description'])
            ->setPostscriptum($formData['postscriptum'])
            ->setVisible($formData['visible'])
            ->setParent($formData['parent'])
        ;

        return $updateEvent;
    }
17513
public function load($data, $formName = null)
    {
        $ret = parent::load($data, $formName); // TODO: Change the autogenerated stub
        $scope = $formName === null ? (new DataProperties())->formName() : $formName;
        if ($scope === '' && !empty($data)) {
            $this->dataProperties->setAttributes($data);
        } elseif (isset($data[$scope])) {
            $_data = $data[$scope];
            if(!empty($_data)) $this->dataProperties->setAttributes($_data);
        }
        return $ret;
    }
1095983
public function getFilterData($filterId = null) {
        if ($filterId !== null) {
            foreach ($this->filterData->filters->filter as $filter) {
                if ($filter->id == $filterId) {
                    return $filter;
                }
            }

            return null;
        } else {
            return $this->filterData;
        }
    }
1218355
public function search($params, $formName = null)
    {
        $query = DpAdminMenuUrlRule::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params, $formName);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'rule_id' => $this->rule_id,
            'url_id' => $this->url_id,
            'status' => $this->status,
        ]);

        $query->andFilterWhere(['like', 'param_name', $this->param_name])
            ->andFilterWhere(['like', 'rule', $this->rule])
            ->andFilterWhere(['like', 'note', $this->note]);

        return $dataProvider;
    }
1282776
protected function getUpdateEvent($formData)
    {
        $event =  $this->getCreateOrUpdateEvent($formData);

        $event->setAddress($this->getExistingObject());

        return $event;
    }
480591
protected function getCreationEvent($formData)
    {
        $brandCreateEvent = new BrandCreateEvent();

        $brandCreateEvent
            ->setLocale($formData['locale'])
            ->setTitle($formData['title'])
            ->setVisible($formData['visible'])
        ;

        return $brandCreateEvent;
    }
499185
public function load($data, $formName = null)
    {
        return $this->_isDataLoaded ?: $this->_isDataLoaded=true && parent::load($data, $formName);
    }
866090
function textForFilter( $filterData )
    {
        $text = false;
        if ( isset( $this->FilterMap[$filterData['name']] ) )
        {
            $filterDefinition =& $this->FilterMap[$filterData['name']];
            $text = $this->convertFilterToText( $filterDefinition, $filterData );
        }
        return $text;
    }