Creates the new record and returns an array keyed by table, containing the new id

@param string $tableName
@param int $pageId
@param array $recordData
@return array
357151
public function createNewRecord(string $tableName, int $pageId, array $recordData): array
    {
        return $this->createNewRecords($pageId, [$tableName => $recordData]);
    }
1277169
public function create_record(array $data) {
		if(is_array($data) && count($data)) {
			$params = array();
			$sqlFields = "";
			$sqlValues = "";
			foreach($data as $field=>$value) {
				$sqlFields = ToolBox::create_list($sqlFields, $field, ", ");
				$sqlValues = ToolBox::create_list($sqlValues, ':'. $field, ", ");
				$params[$field] = $value;
			}
			
			$sql = 'INSERT INTO '. $this->tableName .' ('. $sqlFields .') VALUES ('. $sqlValues .')';			
			
			try {
				$newId = $this->dbObj->run_insert($sql, $params, $this->seqName);
			}
			catch(Exception $e) {
				throw new Exception(__METHOD__ .":: failed to create record, DETAILS::: ". $e->getMessage());
			}
		}
		else {
			throw new Exception(__METHOD__ .":: no data passed");
		}
		return($newId);
	}
753802
public function edit($dataSetId, $columnId, $rowData)
    {
        $this->dataSetId = $dataSetId;
        $this->userId = $this->getEntityProvider()->getMe()->getId();
        $this->getLogger()->info('Editing row ID' . $this->rowId . ' In dataSet ID ' . $dataSetId . ' Column ID' . $columnId);
        $response = $this->doPut('/dataset/data/'. $this->dataSetId . $this->rowId, [
            'dataSetColumnId_' . $columnId => $rowData
            ]);
        
        return $response;
    }
600600
public function getRecord($recordId, $contentTypeName = null, DataDimensions $dataDimensions = null)
    {
        if ($contentTypeName == null) {
            $contentTypeName = $this->getCurrentContentTypeName();
        }

        if ($dataDimensions == null) {
            $dataDimensions = $this->getCurrentDataDimensions();
        }

        $tableName = $this->getContentTypeTableName($contentTypeName);

        $sql = 'SELECT * FROM ' . $tableName . ' WHERE id = ? AND workspace = ? AND language = ? AND deleted = 0 AND validfrom_timestamp <= ? AND validuntil_timestamp > ?';

        $timestamp = TimeShifter::getTimeshiftTimestamp($dataDimensions->getTimeShift());

        $rows = $this->getDatabase()
                     ->fetchAllSQL($sql, [$recordId, $dataDimensions->getWorkspace(), $dataDimensions->getLanguage(), $timestamp, $timestamp]);

        if (count($rows) == 1) {
            return $this->createRecordFromRow(reset($rows), $contentTypeName, $dataDimensions);
        }

        return false;
    }
1050800
protected function getAcfFromPage(int $pageId): array
    {
        $data = [];
        try {
            $data = $this->wpProvider->getFields($pageId);
        } catch (\Throwable $e) {
            ;
        }

        if (!is_array($data) || empty($data)) return [];

        return $data;
    }
1305540
public function getData($pageSize = 10, $pageNo = null)
    {
        if (empty($pageNo) && isset($_GET[$this->getPageVar()])) {
            $pageNo = intval($_GET[$this->getPageVar()]);
        }
        $pageNo = empty($pageNo) ? 1 : $pageNo;
        return [
            'pageSize' => $pageSize,
            'pageNo' => $pageNo,
            'totalCount' => $this->_dbInstance->getTotalCount(),
            'result' => $this->_dbInstance->getData($pageSize, $pageNo),
        ];
    }
837405
public function getParentByPageId($pageId)
    {
        $data = array();
        $success = 0;

        $treeSite = $this->getServiceLocator()->get('MelisSiteTree');

        if($treeSite){
            $data  = $treeSite->getParentByPageId($pageId);
        }


        return $data;
    }
691766
public function buildPageResourceId(
        $siteId,
        $pageType,
        $pageName
    ) {
        return $this->resourceName->get(
            ResourceName::RESOURCE_SITES,
            $siteId,
            ResourceName::RESOURCE_PAGES,
            $pageType,
            $pageName
        );
    }
597965
public function buildPageQuery($pageId)
    {
        $siteRepository = GeneralUtility::makeInstance(SiteRepository::class);
        $site = $siteRepository->getSiteByPageId($pageId);

        return $this->newSearchQuery('')
            ->useQueryString('*:*')
            ->useFilter('(type:pages AND uid:' . $pageId . ') OR (*:* AND pid:' . $pageId . ' NOT type:pages)', 'type')
            ->useFilter('siteHash:' . $site->getSiteHash(), 'siteHash')
            ->useReturnFields(ReturnFields::fromString('*'))
            ->useSortings(Sortings::fromString('type asc, title asc'))
            ->useQueryType('standard')
            ->getQuery();
    }
610245
protected function loadAttributesRawData($storeId, array $entityIds, $tableName, array $attributeIds)
    {
        return $this->resourceModel->getAttributesRawData($storeId, $entityIds, $tableName, $attributeIds);
    }
1044818
public function createPages(
        SiteEntity $site,
        $pagesData,
        $publishPage = false,
        $doFlush = false
    ) {
        $results = [];

        foreach ($pagesData as $name => $pageData) {
            $results[] = $this->createPage(
                $site,
                $pageData,
                $publishPage,
                $doFlush
            );
        }

        return $results;
    }
51112
public function replaceSurveyPage($surveyId, $pageId, array $data = [])
	{
		return $this->sendRequest(
			$this->createRequest('PUT', sprintf('surveys/%d/pages/%d', $surveyId, $pageId), [], $data)
		);
	}
121538
public function handle(string $tableName)
    {
        $recordFinder = GeneralUtility::makeInstance(RecordFinder::class);
        $pidOfMainTable = $recordFinder->findPidOfMainTableRecord($tableName);
        $recordData = GeneralUtility::makeInstance(RecordData::class);

        $childRelationUids = [];
        $numberOfChildRelationsToCreate = 2;
        $numberOfChildRows = 4;
        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
        for ($i = 0; $i < $numberOfChildRows; $i ++) {
            $fieldValues = [
                'pid' => $pidOfMainTable,
            ];
            $connection = $connectionPool->getConnectionForTable('tx_styleguide_inline_mn_child');
            $connection->insert('tx_styleguide_inline_mn_child', $fieldValues);
            $fieldValues['uid'] = $connection->lastInsertId('tx_styleguide_inline_mn_child');
            if (count($childRelationUids) < $numberOfChildRelationsToCreate) {
                $childRelationUids[] = $fieldValues['uid'];
            }
            $fieldValues = $recordData->generate('tx_styleguide_inline_mn_child', $fieldValues);
            $connection->update(
                'tx_styleguide_inline_mn_child',
                $fieldValues,
                [ 'uid' => (int)$fieldValues['uid'] ]
            );
        }

        $fieldValues = [
            'pid' => $pidOfMainTable,
            'inline_1' => $numberOfChildRelationsToCreate,
        ];
        $connection = $connectionPool->getConnectionForTable($tableName);
        $connection->insert($tableName, $fieldValues);
        $parentid = $fieldValues['uid'] = $connection->lastInsertId($tableName);
        $fieldValues = $recordData->generate($tableName, $fieldValues);
        $connection->update(
            $tableName,
            $fieldValues,
            [ 'uid' => (int)$fieldValues['uid'] ]
        );

        $this->generateTranslatedRecords($tableName, $fieldValues);

        foreach ($childRelationUids as $uid) {
            $mmFieldValues = [
                'pid' => $pidOfMainTable,
                'parentid' => $parentid,
                'childid' => $uid,
            ];
            $connection = $connectionPool->getConnectionForTable('tx_styleguide_inline_mn_mm');
            $connection->insert('tx_styleguide_inline_mn_mm', $mmFieldValues);
        }
    }
304345
public function updateFields($domainName, $recordId, $fields)
    {
        $domainRecord = $this->adapter->put(sprintf('%s/domains/%s/records/%d', $this->endpoint, $domainName, $recordId), $fields);

        $domainRecord = json_decode($domainRecord);

        return new DomainRecordEntity($domainRecord->domain_record);
    }
856402
function update_content($recordid, $value, $name=''){
        global $DB;

        $content = new stdClass();
        $content->fieldid = $this->field->id;
        $content->recordid = $recordid;
        $content->content = clean_param($value, PARAM_NOTAGS);

        if ($oldcontent = $DB->get_record('data_content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid))) {
            $content->id = $oldcontent->id;
            return $DB->update_record('data_content', $content);
        } else {
            return $DB->insert_record('data_content', $content);
        }
    }
747667
public function insertRecord($tableName, $newRecord)
    {
        $query = SQLEncoder::encodeInsertRecord($tableName, $newRecord);
        $this->con->query($query);
    }
392463
public function get($blogId, $pageId, $optParams = array()) {
      $params = array('blogId' => $blogId, 'pageId' => $pageId);
      $params = array_merge($params, $optParams);
      $data = $this->__call('get', array($params));
      if ($this->useObjects()) {
        return new Page($data);
      } else {
        return $data;
      }
    }