FluidTYPO3\Flux\Service\ContentService::affectRecordByRequestParameters PHP Method

affectRecordByRequestParameters() public method

public affectRecordByRequestParameters ( mixed $id, array &$row, array $parameters, TYPO3\CMS\Core\DataHandling\DataHandler $tceMain ) : void
$id mixed
$row array
$parameters array
$tceMain TYPO3\CMS\Core\DataHandling\DataHandler
return void
    public function affectRecordByRequestParameters($id, array &$row, $parameters, DataHandler $tceMain)
    {
        unset($id, $tceMain);
        if (FALSE === empty($parameters['overrideVals']['tt_content']['tx_flux_parent'])) {
            $row['tx_flux_parent'] = (int) $parameters['overrideVals']['tt_content']['tx_flux_parent'];
            if (0 < $row['tx_flux_parent']) {
                $row['colPos'] = self::COLPOS_FLUXCONTENT;
            }
        }
    }

Usage Example

Beispiel #1
0
 /**
  * @param string $operation
  * @param integer $id
  * @param array $row
  * @param DataHandler $reference
  * @param array $removals Allows overridden methods to pass an additional array of field names to remove from the stored Flux value
  * @return void
  */
 public function postProcessRecord($operation, $id, array &$row, DataHandler $reference, array $removals = array())
 {
     if (TRUE === self::shouldCallWithClassName(__CLASS__, __FUNCTION__, $id)) {
         parent::postProcessRecord($operation, $id, $row, $reference, $removals);
         $parameters = GeneralUtility::_GET();
         $this->contentService->affectRecordByRequestParameters($id, $row, $parameters, $reference);
         self::trackMethodCallWithClassName(__CLASS__, __FUNCTION__, $id);
     }
 }