Manipulating the input array, $params, adding new selectorbox items.

@param	array	$params array of select field options (reference)
@param	object	$pObj parent object (reference)
@return	void
8675
public function addConfigFunctionary(&$params, &$pObj)
    {
        $aID = $params['flexParentDatabaseRow']['pi_flexform']['data']['General']['lDEF']['settings.associationID']['vDEF'];

        if (!empty($aID)) {
            $associationRepository = $this->objectManager->get(AssociationRepository::class);
            $functionaryRepository = $this->objectManager->get(FunctionaryRepository::class);

            $association = $associationRepository->findByID($params['flexParentDatabaseRow']['pi_flexform']['data']['General']['lDEF']['settings.associationID']['vDEF']);

            $functionaries = $functionaryRepository->findFunctionariesByAssociation($association);

            foreach ($functionaries->getfunctionaries() as $functionary) {
                $params['items'][] = [
          implode(' | ', [implode(' ', [$functionary->getLastName(), $functionary->getFirstName()]), $functionary->getRole()]),
          $functionary->getID()
        ];
            }
        }
    }
783835
public function layoutItemsProcFunc(array &$params)
    {
        $this->init($params['row']['pid']);
        $layoutSelectItems = $this->layoutSetup->getLayoutSelectItems(
            isset($params['row']['colPos'][0]) ? $params['row']['colPos'][0] : $params['row']['colPos'],
            $params['row']['tx_gridelements_columns'],
            $params['row']['tx_gridelements_container'],
            $this->layoutSetup->getRealPid()
        );
        $params['items'] = ArrayUtility::keepItemsInArray($layoutSelectItems, $params['items'], true);
    }
1129894
public static function input($params = array()) {

        if( !is_array($params) )
        {
            throw new \InvalidArgumentException("Arguments is not a Array". print_r($params, true));
        }

        $o = '<input ';
        $o .= (isset($params['type'])) ? " type='{$params['type']}'" : 'type="text"';
        $o .= (isset($params['id'])) ? " id='{$params['id']}'" : '';
        $o .= (isset($params['name'])) ? " name='{$params['name']}'" : '';
        $o .= (isset($params['class'])) ? " class='form-input text {$params['class']}'" : '';
        $o .= (isset($params['onclick'])) ? " onclick='{$params['onclick']}'" : '';
        $o .= (isset($params['onkeypress'])) ? " onkeypress='{$params['onkeypress']}'" : '';
        $o .= (isset($params['value'])) ? ' value="' . $params['value'] . '"' : '';
        $o .= (isset($params['length'])) ? " maxlength='{$params['length']}'" : '';
        $o .= (isset($params['width'])) ? " style='width:{$params['width']}px;'" : '';
        $o .= (isset($params['disabled'])) ? " disabled='{$params['disabled']}'" : '';
        $o .= (isset($params['placeholder'])) ? " placeholder='{$params['placeholder']}'" : '';
        $o .= (isset($params['accept'])) ? " accept='{$params['accept']}'" : '';
        $o .= (isset($params['maxlength'])) ? " maxlength='{$params['maxlength']}'" : '';
        $o .= (isset($params['minlength'])) ? " minlength='{$params['minlength']}'" : '';
        $o .= (isset($params['style'])) ? " style='{$params['style']}'" : '';
        $o .= (isset($params['required'])) ? " required='required'" : '';
        $o .= (isset($params['autocomplete'])) ? " autocomplete='{$params['autocomplete']}'" : '';
        $o .= (isset($params['autofocus'])) ? " autofocus" : '';
        $o .= " />\n";
        return $o;
    }
943028
protected function setQueryParams(array $params)
    {
        foreach ($params as $key => $value) {
            $this->setQueryParam($key, $value);
        }
    }
577242
function selectPointers (params) {
  if (params.pointers) {
    delete params.pointers['-_id'];
    params.select = Object.keys(params.pointers).join(' ');
  } else {
    delete params.select;
  }
  return params.select;
}
665214
public function bind(PbjxEvent $pbjxEvent): void
    {
        $request = $pbjxEvent->getMessage();
        $query = trim((string)$request->get('q'));
        if (empty($query)) {
            return;
        }

        $parsedQuery = $this->queryParser->parse($query);
        $request
            ->set('q', $query)
            ->addToSet('fields_used', $parsedQuery->getFieldsUsed())
            ->set('parsed_query_json', json_encode($parsedQuery));
    }
926631
public function renderJs($viewFile, $params = [], $pos = null)
    {
        $params['widget'] = $this;
        $js = $this->view->render($viewFile, $params);
        $this->registerJs($js, $pos);
    }
1335557
public function putSelectFields($objBuilder, $strPrefix = null, $objSelect = null)
    {
        if ($strPrefix) {
            $strTableName = $strPrefix;
            $strAliasPrefix = $strPrefix . '__';
        } else {
            $strTableName = $this->strTableName;
            $strAliasPrefix = '';
        }

        if ($objSelect) {
            if (!$objSelect->skipPrimaryKey() && !$objBuilder->Distinct) {
                $strFields = $this->primaryKeyFields();
                foreach ($strFields as $strField) {
                    $objBuilder->addSelectItem($strTableName, $strField, $strAliasPrefix . $strField);
                }
            }
            $objSelect->addSelectItems($objBuilder, $strTableName, $strAliasPrefix);
        } else {
            $strFields = $this->fields();
            foreach ($strFields as $strField) {
                $objBuilder->addSelectItem($strTableName, $strField, $strAliasPrefix . $strField);
            }
        }
    }
792281
public function itemsProcFunc(array &$params)
    {
        if ((int)$params['row']['pid'] > 0) {
            $colPos = is_array($params['row']['colPos']) ? $params['row']['colPos'][0] : $params['row']['colPos'];
            $this->checkForAllowedCTypes(
                $params['items'],
                $params['row']['pid'],
                $colPos,
                $params['row']['tx_gridelements_container'],
                $params['row']['tx_gridelements_columns']
            );
        } else {
            $this->init((int)$params['row']['pid']);
            // negative uid_pid values indicate that the element has been inserted after an existing element
            // so there is no pid to get the backendLayout for and we have to get that first
            $existingElement = BackendUtility::getRecordWSOL('tt_content', -((int)$params['row']['pid']), 'pid,CType,colPos,tx_gridelements_container,tx_gridelements_columns');
            if ((int)$existingElement['pid'] > 0) {
                $this->checkForAllowedCTypes(
                    $params['items'],
                    $existingElement['pid'],
                    $existingElement['colPos'],
                    $existingElement['tx_gridelements_container'],
                    $existingElement['tx_gridelements_columns']
                );
            }
        }
    }
1011931
public function process_form( $params, $obj = null, $fields = null, $thank_you = null ) {

		$this->display_errors = false;

		$form = null;

		$nonce    = pods_var( '_pods_nonce', $params );
		$pod      = pods_var( '_pods_pod', $params );
		$id       = pods_var( '_pods_id', $params );
		$uri      = pods_var( '_pods_uri', $params );
		$form     = pods_var( '_pods_form', $params );
		$location = pods_var( '_pods_location', $params );

		if ( is_object( $obj ) ) {
			$pod = $obj->pod;
			$id  = $obj->id();
		}

		if ( ! empty( $fields ) ) {
			$fields = array_keys( $fields );
			$form   = implode( ',', $fields );
		} else {
			$fields = explode( ',', $form );
		}

		if ( empty( $nonce ) || empty( $pod ) || empty( $uri ) || empty( $fields ) ) {
			return pods_error( __( 'Invalid submission', 'pods' ), $this );
		}

		$uid = @session_id();

		if ( is_user_logged_in() ) {
			$uid = 'user_' . get_current_user_id();
		}

		$field_hash = wp_create_nonce( 'pods_fields_' . $form );

		$action = 'pods_form_' . $pod . '_' . $uid . '_' . $id . '_' . $uri . '_' . $field_hash;

		if ( empty( $uid ) ) {
			return pods_error( __( 'Access denied for your session, please refresh and try again.', 'pods' ), $this );
		}

		if ( false === wp_verify_nonce( $nonce, $action ) ) {
			return pods_error( __( 'Access denied, please refresh and try again.', 'pods' ), $this );
		}

		$data = array();

		foreach ( $fields as $field ) {
			$data[ $field ] = pods_var_raw( 'pods_field_' . $field, $params, '' );
		}

		$params = array(
			'pod'      => $pod,
			'id'       => $id,
			'data'     => $data,
			'from'     => 'process_form',
			'location' => $location
		);

		$id = $this->save_pod_item( $params );

		/**
		 * Fires after the form has been processed and save_pod_item has run.
		 *
		 * @param int       $id     Item ID.
		 * @param array     $params save_pod_item parameters.
		 * @param null|Pods $obj    Pod object (if set).
		 */
		do_action( 'pods_api_processed_form', $id, $params, $obj );

		// Always return $id for AJAX requests.
		if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
			if ( 0 < $id && ! empty( $thank_you ) ) {
				$thank_you = str_replace( 'X_ID_X', $id, $thank_you );

				pods_redirect( $thank_you, 302, false );
			}
		}

		return $id;
	}
1202400
private static function createBrickArrayForDocument($postValues, $documentObj, $staticBricks)
    {
        if (isset($postValues['bricks'])) {
            foreach ($postValues['bricks'] as $brickSlug => $brick) {
                // Find the current bricktype and check if its multiple
                list($staticBrick, $multiple) = self::getStaticBrickAndSetMultiple($staticBricks, $brickSlug);

                if ($multiple) {
                    $documentObj = self::addMultipleBricks($documentObj, $brick, $staticBrick, $brickSlug);
                } else {
                    $documentObj = self::addSingleBrick($documentObj, $brick, $brickSlug);
                }
            }
        }
        return $documentObj;
    }
503085
public function processDatamap_postProcessFieldArray($status, $table, $id, array &$fieldArray, DataHandler $pObj)
    {
        if ($table === 'tt_address' && $status === 'new') {
            if (empty($fieldArray['registeraddresshash'])) {
                $rnd = microtime(true) . random_int(10000, 90000);
                $regHash = sha1($fieldArray['email'] . $rnd);

                $fieldArray['registeraddresshash'] = $regHash;
            }
        }
    }
816446
public function addDataObject($p_params){
        try {
            if(isset($p_params->label)){
                $this->object_retour->data[$p_params->label] = $p_params->value;
            }else{
                $this->object_retour->data = $p_params;
            }
        } catch (Exception $ex) {
            $this->dieInError($ex.'');
        }
    }
616468
private function addParamsToQuery(\stdClass $obj_query, array $arr_params)
    {
        if(count($arr_params) > 0) {
            $obj_bindings = new \stdClass();
            foreach ($arr_params as $str_name => $mix_value) {
                if('startCursor' == $str_name || 'endCursor' == $str_name) {
                    $obj_bindings->{$str_name} = (object)['cursor' => (string)$mix_value];
                } else {
                    $obj_bindings->{$str_name} = (object)['value' => $this->buildQueryParamValue($mix_value)];
                }
            }
            $obj_query->namedBindings = $obj_bindings;
        }
    }
1332615
public function init(Pluginbase $pObj)
    {
        $this->pObj = $pObj;
        $this->cObj = $this->pObj->cObj;
        $this->conf = $this->pObj->conf;
    }
1279887
public function setParams($params)
    {
        if (is_array($params) && isset($params['job'])) {
            $this->setJobEntity($params['job']);
            unset($params['job']);
        } elseif (is_object($params) && isset($params->job)) {
            $this->setJobEntity($params->job);
        }

        return parent::setParams($params);
    }
520862
public function setParams($params): void
    {
        if (! \is_array($params) && ! $params instanceof \ArrayAccess) {
            throw new \InvalidArgumentException('Event params are invalid. Expected type is array or \\ArrayAccess. Got ' . \gettype($params));
        }

        $this->params = $params;
    }