public function createFieldValuesForIndexing(
        $storagepid,
        $title,
        $type,
        $targetpid,
        $content,
        $tags = '',
        $params = '',
        $abstract = '',
        $language = 0,
        $starttime = 0,
        $endtime = 0,
        $fe_group = '',
        $additionalFields = array()
    ) {
        $now = time();
        $fieldsValues = array(
            'pid' => intval($storagepid),
            'title' => $this->stripControlCharacters($title),
            'type' => $type,
            'targetpid' => $targetpid,
            'content' => $this->stripControlCharacters($content),
            'tags' => $tags,
            'params' => $params,
            'abstract' => $this->stripControlCharacters($abstract),
            'language' => intval($language),
            'starttime' => intval($starttime),
            'endtime' => intval($endtime),
            'fe_group' => $fe_group,
            'tstamp' => $now,
            'crdate' => $now,
        );

        // add all registered additional fields to field value and set default values
        foreach ($this->additionalFields as $fieldName) {
            if ($fieldName == 'orig_pid' || $fieldName == 'sortdate') {
                $fieldsValues[$fieldName] = 0;
            } else {
                $fieldsValues[$fieldName] = '';
            }
        }

        // merge filled additionalFields with ke_search fields
        if (count($additionalFields)) {
            $fieldsValues = array_merge($fieldsValues, $additionalFields);
        }

        // full quoting record
        // Todo quoting
//      $fieldsValues = Db::getQueryBuilder('tx_kesearch_index')->quoteColumnValuePairs($fieldsValues);

        return $fieldsValues;
    }
public function createFieldValuesForIndexing(
        $storagepid,
        $title,
        $type,
        $targetpid,
        $content,
        $tags = '',
        $params = '',
        $abstract = '',
        $language = 0,
        $starttime = 0,
        $endtime = 0,
        $fe_group = '',
        $additionalFields = array()
    ) {
        $now = time();
        $fieldsValues = array(
            'pid' => intval($storagepid),
            'title' => $this->stripControlCharacters($title),
            'type' => $type,
            'targetpid' => $targetpid,
            'content' => $this->stripControlCharacters($content),
            'tags' => $tags,
            'params' => $params,
            'abstract' => $this->stripControlCharacters($abstract),
            'language' => intval($language),
            'starttime' => intval($starttime),
            'endtime' => intval($endtime),
            'fe_group' => $fe_group,
            'tstamp' => $now,
            'crdate' => $now,
        );

        // add all registered additional fields to field value and set default values
        foreach ($this->additionalFields as $fieldName) {
            if ($fieldName == 'orig_pid' || $fieldName == 'sortdate') {
                $fieldsValues[$fieldName] = 0;
            } else {
                $fieldsValues[$fieldName] = '';
            }
        }

        // merge filled additionalFields with ke_search fields
        if (count($additionalFields)) {
            $fieldsValues = array_merge($fieldsValues, $additionalFields);
        }

        // full quoting record
        // Todo quoting
//      $fieldsValues = Db::getQueryBuilder('tx_kesearch_index')->quoteColumnValuePairs($fieldsValues);

        return $fieldsValues;
    }
public function createFieldValuesForIndexing ( $ storagepid , $ title , $ type , $ targetpid , $ content , $ tags = '' , $ params = '' , $ abstract = '' , $ language = 0 , $ starttime = 0 , $ endtime = 0 , $ fe_group = '' , $ additionalFields = array ( ) ) { $ now = time ( ) ; $ fieldsValues = array ( 'pid' => intval ( $ storagepid ) , 'title' => $ this -> stripControlCharacters ( $ title ) , 'type' => $ type , 'targetpid' => $ targetpid , 'content' => $ this -> stripControlCharacters ( $ content ) , 'tags' => $ tags , 'params' => $ params , 'abstract' => $ this -> stripControlCharacters ( $ abstract ) , 'language' => intval ( $ language ) , 'starttime' => intval ( $ starttime ) , 'endtime' => intval ( $ endtime ) , 'fe_group' => $ fe_group , 'tstamp' => $ now , 'crdate' => $ now , ) ; // add all registered additional fields to field value and set default values foreach ( $ this -> additionalFields as $ fieldName ) { if ( $ fieldName == 'orig_pid' || $ fieldName == 'sortdate' ) { $ fieldsValues [ $ fieldName ] = 0 ; } else { $ fieldsValues [ $ fieldName ] = '' ; } } // merge filled additionalFields with ke_search fields if ( count ( $ additionalFields ) ) { $ fieldsValues = array_merge ( $ fieldsValues , $ additionalFields ) ; } // full quoting record // Todo quoting //      $fieldsValues = Db::getQueryBuilder('tx_kesearch_index')->quoteColumnValuePairs($fieldsValues); return $ fieldsValues ; }
Create fieldValues to save them in db later on
sets some default values, too
@param integer $storagepid
@param string $title
@param string $type
@param string $targetpid
@param string $content
@param string $tags
@param string $params
@param string $abstract
@param integer $language
@param integer $starttime
@param integer $endtime
@param string $fe_group
@param array $additionalFields
@return boolean true if record was found, false if not
Create fieldValues to save them in db later on sets some default values too