Return field for ordering data as array

@return array Return field for ordering data.
505469
public function getOrderFiled() {
		$result = [];
		$orderField = $this->_getOrderField();
		if (empty($orderField)) {
			return $result;
		}

		$result[$this->alias . '.' . $orderField] = 'asc';

		return $result;
	}
879897
public function toArray()
    {
        $data = array();
        foreach ($this->violations as $violation) {
            $data[] = $violation->getMessage();
        }

        return $data;
    }
1129612
private function _formatOrder()
    {
        $orders = array();

        if (isset($this->_order[DbInterface::ORDER_RAND])) {
            $orders[] = 'RAND()';
        } else {
            foreach ($this->_order as $field => $order) {
                $orders[] = "`$field` $order";
            }
        }

        return ' ORDER BY ' . implode(', ', $orders);
    }
999526
private function getSortOrder()
    {
        return [
            $this->translator->trans(/** @Desc("Ascending") */ 'content_type.sort_field.ascending', [], 'content_type') => Location::SORT_ORDER_ASC,
            $this->translator->trans(/** @Desc("Descending") */ 'content_type.sort_field.descending', [], 'content_type') => Location::SORT_ORDER_DESC,
        ];
    }
679405
public function getData() {
        if ($this->toSort && !empty($this->getOrder())) {
            $this->sortData();
        }

        if ($this->getLimit()) {
            return array_slice($this->data, $this->getOffset(), $this->getLimit());
        } else {
            return $this->data;
        }
    }
1334205
public function getAttributes()
    {
        // prevent order of fields from changing
        $sortedAttribs = [];
        foreach ($this->sortedFields as $ix => $attribute) {
            $sortedAttribs[$attribute] = $this->attributes[$attribute];
        }

        return $sortedAttribs;
    }
169451
public function toArray()
    {
        $fieldValues = [];
        foreach ($this->fields as $group) {
            foreach ($group as $name => $field) {
                $fieldValues[$name] = $field->getValue();
            }
        }
        return $fieldValues;
    }
984934
public function getOrdering()
    {
        // if the following code fails, fall back to this default ordering
        $orderBy = $this->conf['sortWithoutSearchword'];

        // if sorting in FE is allowed
        if ($this->conf['showSortInFrontend']) {
            $piVarsField = $this->pObj->piVars['sortByField'];
            $piVarsDir = $this->pObj->piVars['sortByDir'];
            $piVarsDir = ($piVarsDir == '') ? 'asc' : $piVarsDir;
            if (!empty($piVarsField)) { // if an ordering field is defined by GET/POST
                $isInList = GeneralUtility::inList($this->conf['sortByVisitor'], $piVarsField);
                if ($this->conf['sortByVisitor'] != '' && $isInList) {
                    $orderBy = $piVarsField . ' ' . $piVarsDir;
                }
                // if sortByVisitor is not set OR not in the list of
                // allowed fields then use fallback ordering in "sortWithoutSearchword"
            }
            // if sortByVisitor is not set OR not in the list of
            //allowed fields then use fallback ordering in "sortWithoutSearchword"
        } else {
            if (!empty($this->pObj->wordsAgainst)) { // if sorting is predefined by admin
                $orderBy = $this->conf['sortByAdmin'];
            } else {
                $orderBy = $this->conf['sortWithoutSearchword'];
            }
        }

        return $orderBy;
    }
679992
protected function toArray()
    {
        $arr = parent::toArray();
        $order = [
            Resources::XTAG_NAMESPACE,
            Resources::XTAG_SERVICE_NAME,
            Resources::XTAG_LABEL,
            Resources::XTAG_DESCRIPTION,
            Resources::XTAG_LOCATION,
            Resources::XTAG_AFFINITY_GROUP,
        ];
        $ordered = Utilities::orderArray($arr, $order);

        return $ordered;
    }
199043
public function toArray()
	{
		$list = parent::toArray();

		$list['order.base.address.baseid'] = $this->getBaseId();
		$list['order.base.address.addressid'] = $this->getAddressId();
		$list['order.base.address.type'] = $this->getType();

		return $list;
	}
852139
protected function sortOrderString()
    {
        $sortOrderComponents = [];
        foreach ($this->getSortOrder() as $sortCriterion) {
            $sortOrderComponents[] = $sortCriterion['fieldName'] . ':'
                    . (($sortCriterion['direction'] === 'descending') ? '0' : '1');
        }
        $sortOrderString = implode(',', $sortOrderComponents);

        return $sortOrderString;
    }
1140515
public function toArray()
    {
        $out = [];

        foreach ($this->setFields as $key) {
            $property = $this->{$key};

            if ($property instanceof DateTime) {
                $out[$key] = $property->format(DateTime::ISO8601);
            } else {
                $out[$key] = $property;
            }
        }

        return $out;
    }
559702
public function getOrderColumn()
    {
        $requestedColumnNames = $this->getRequestedColumnNames()->toArray();

        $order = request('order');

        $orderColumn = $requestedColumnNames[$order[0]['column']];

        if ($methodName = $this->hasCustomOrdering($orderColumn)) {
            $orderColumn = $this->class::$methodName();
        } elseif ($methodName = $this->hasCustomRawOrdering($orderColumn)) {
            // Convert it into an array so that parent function can return directly
            $orderColumn = [$this->class::$methodName($order[0]['dir'])];
        }

        return $orderColumn;
    }
710162
public function asArray()
    {
        $fields = [
            '@type' => $this->type(),
            '@key'  => $this->key(),
        ];

        foreach ($this->fields as $name => $field) {
            $fields[$name] = $field->value;
        }

        return $fields;
    }
40051
protected function toArray()
    {
        $arr = parent::toArray();
        $order = [
            Resources::XTAG_NAMESPACE,
            Resources::XTAG_NAME,
            Resources::XTAG_LABEL,
            Resources::XTAG_DESCRIPTION,
            Resources::XTAG_LOCATION,
        ];
        Utilities::addIfNotEmpty(Resources::XTAG_NAME, $this->getName(), $arr);
        $ordered = Utilities::orderArray($arr, $order);

        return $ordered;
    }
1335230
public function buildOrder()
	{
		$orders = [];

		foreach ($this->order as $order)
		{
			if (is_object($order['column']))
			{
				$string = $order['column']->build($this);
			}
			else
			{
				$string = $this->connection->quoteName($order['column']);
			}

			$string .= ' ' . strtoupper($order['dir']);
			$orders[] = $string;
		}

		return 'ORDER BY ' . implode(',', $orders);
	}
220876
public function toArray()
    {
        $content = [
            'id' => $this->content->id,
            '_content' => $this->content->toArray(),
            '_revision' => $this->revision->toArray(),
        ];

        foreach ($this->data as $field => $data) {
            $content[$field] = $data->toArray();
        }

        return $content;
    }