FluidTYPO3\Flux\Provider\AbstractProvider::postProcessDatabaseOperation PHP Method

postProcessDatabaseOperation() public method

Post-process database operation for the table that this ConfigurationProvider is attached to.
public postProcessDatabaseOperation ( string $status, integer $id, array &$row, TYPO3\CMS\Core\DataHandling\DataHandler $reference ) : void
$status string TYPO3 operation identifier, i.e. "new" etc.
$id integer The ID of the current record (which is sometimes now included in $row
$row array The record's data, by reference. Changing fields' values changes the record's values just before saving after operation
$reference TYPO3\CMS\Core\DataHandling\DataHandler A reference to the \TYPO3\CMS\Core\DataHandling\DataHandler object that is currently performing the database operation
return void
    public function postProcessDatabaseOperation($status, $id, &$row, DataHandler $reference)
    {
        // We dispatch the Outlet associated with the Form, triggering each defined
        // Pipe inside the Outlet to "conduct" the data.
        $record = $this->loadRecordFromDatabase($id);
        if (NULL !== $record) {
            $form = $this->getForm($record);
            if (TRUE === $form instanceof Form\FormInterface) {
                $form->getOutlet()->fill(array('command' => $status, 'uid' => $id, 'record' => $row, 'table' => $this->getTableName($record), 'provider' => $this, 'dataHandler' => $reference));
            }
        }
    }

Usage Example

 /**
  * @param string $status
  * @param integer $id
  * @param array $row
  * @param DataHandler $reference
  * @return void
  */
 public function postProcessDatabaseOperation($status, $id, &$row, DataHandler $reference)
 {
     parent::postProcessDatabaseOperation($status, $id, $row, $reference);
     if ($status === 'new') {
         $this->contentService->initializeRecord($row, $reference);
     }
 }
All Usage Examples Of FluidTYPO3\Flux\Provider\AbstractProvider::postProcessDatabaseOperation