Hook method for postProcessFieldArray
@param $status
@param $table
@param $id
@param array $fieldArray
@param DataHandler $pObj
@return void
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;
            }
        }
    }
248834
public void postProcess() {
		if (foreignColumnName != null) {
			foreignAutoRefresh = true;
		}
		if (foreignAutoRefresh && maxForeignAutoRefreshLevel == NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED) {
			maxForeignAutoRefreshLevel = DatabaseField.DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL;
		}
	}
1261753
void postBackout(Transaction transaction)
                    throws ObjectManagerException
    {
        throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]);
    }
456261
@Override
	protected StringBuffer doPostProcessBundle(BundleProcessingStatus status, StringBuffer bundleData)
			throws IOException {
		LOGGER.info("Post processing file '" + status.getLastPathAdded() + "'");

		String bundleMediaTypePropertyName = "jawr.css.bundle." + status.getCurrentBundle().getName() + ".media";
		JawrConfig config = status.getJawrConfig();
		String bundleMediaType = (String) config.getProperty(bundleMediaTypePropertyName);
		if (bundleMediaType == null) {
			LOGGER.warn("no bundle media type provided; use 'screen'");
			bundleMediaType = "screen";
		}

		LOGGER.info("bundle media type: " + bundleMediaType);

		StringBuffer sb = new StringBuffer(
				CSS_MEDIA_RULE + " " + bundleMediaType + " " + CSS_MEDIA_RULE_OPEN + StringUtils.STR_LINE_FEED);
		sb.append(bundleData);
		sb.append(CSS_MEDIA_RULE_CLOSE + StringUtils.STR_LINE_FEED + StringUtils.STR_LINE_FEED);

		LOGGER.info("Postprocessing finished");
		return sb;
	}
427220
public void processResponse(Object results, Object status) {
        ElevationStatus pStatus = ElevationStatus.UNKNOWN_ERROR;
        
        if (status instanceof String && results instanceof JSObject) {
            pStatus = ElevationStatus.valueOf((String) status);
            if (ElevationStatus.OK.equals(pStatus)) {
                JSObject jsres = (JSObject) results;
                Object len = jsres.getMember("length");
                if (len instanceof Number) {
                    int n = ((Number)len).intValue();
                    ElevationResult[] ers = new ElevationResult[n];
                    for (int i = 0; i < n; i++) {
                        Object obj = jsres.getSlot(i);
                        if (obj instanceof JSObject) {
                            ers[i] = new ElevationResult((JSObject) obj);
                        }
                    }
                    callback.elevationsReceived(ers, pStatus);
                    return;
                }
            }
        }
        callback.elevationsReceived(new ElevationResult[]{}, pStatus);
    }
1210027
public function notice(string $id, string $message, int $status = 400)
    {
        Log::info($id . ' : ' . $message);

        return response ()->json (['success' => false, 'id' => $id, 'message' => $message], $status);
    }
570281
public function actionChangeProductStatus($id, $status)
    {
        if (!empty($id) && !empty($status)) {
            $product = Product::findOne($id);
            if ($product->status == Product::STATUS_ON_MODERATION) {

                switch ($status) {
                    case Product::STATUS_SUCCESS:
                        $product->status = Product::STATUS_SUCCESS;
                        $product->save();

                        $this->trigger(self::EVENT_AFTER_ACCEPT_PRODUCT, new ProductEvent([
                            'id' => $id
                        ]));

                        break;
                    case Product::STATUS_DECLINED:
                        $product->status = Product::STATUS_DECLINED;
                        $product->save();
                        break;
                }

                $this->trigger(self::EVENT_AFTER_EDIT_PRODUCT, new ProductEvent([
                    'id' => $id
                ]));
            }
        }
        return $this->redirect(Yii::$app->request->referrer);
    }
1217600
@Override
    protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
        beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(servletContext));
        beanFactory.ignoreDependencyInterface(ServletContextAware.class);
        beanFactory.registerResolvableDependency(ServletContext.class, servletContext);

        WebApplicationContextUtils.registerWebApplicationScopes(beanFactory);
    }
753951
final protected function initPostStatusesTrait(): void {
		$postStatuses = $this->getPostStatuses();
		
		// first, we register our statuses.  notice that we directly call the
		// WordPress add_action() function because we want to use anonymous
		// functions here, and there's no good way to add these actions to a
		// LoaderInterface object as a result.  plus, we want these actions to
		// "just happen" without a programmer having to think about them.
		
		$options = [];
		foreach ($postStatuses as $postStatus) {
			$args = $this->getPostStatusArguments($postStatus);
			add_action("init", function () use ($postStatus, $args) {
				register_post_status($postStatus, $args);
			});
			
			$options[$postStatus] = $args["label"];
		}
		
		add_action("post_submitbox_misc_actions",
			function (\WP_Post $post) use ($options) {
				// registering our post status tells WordPress all about it,
				// but WordPress doesn't automatically add them to the <select>
				// elements in the DOM.  so, we do that here.  for more info
				// see https://core.trac.wordpress.org/ticket/12706.
				
				$jsonOptions = "{";
				$optionFormat = '"%s": { "display": "%s", "selected": %d },';
				foreach ($options as $status => $display) {
					$selected = (int)$post->post_status === $status;
					
					// for each of our options, we use the above format to
					// create a series of JSON strings which we can inject
					// into our JavaScript below.
					
					$jsonOptions .= sprintf($optionFormat, $status, $display, $selected);
				}
				
				// the loop above adds an extra comma to our JSON string.
				// we'll replace that comma with a the closing curly brace
				// to end said string.
				
				$jsonOptions = preg_replace("/,$/", "}", $jsonOptions);
				ob_start(); ?>

                <script id="php7BoilerplateAddPostStatuses">
					(function ($) {

						// we'll add our statuses into the scope of this
						// anonymous functions.  that way, it's accessible
						// to the other functions, anonymous or otherwise,
						// herein.  but, it won't conflict with any other
						// variable named statuses outside this scope.

						var statuses = <?= $jsonOptions ?>;

						$(document).ready(function () {
							var statusSelect = $("#post_status");
							if (statusSelect.length > 0) {

								// as long as we have a status <select> in
								// the DOM, we'll want to do some work to make
                                // our custom statuses work.

								setDisplayedStatus(statusSelect);
								$(".save-post-status").click(setHiddenStatus);
								addCustomStatuses(statusSelect);
							}
						});
						
						function setDisplayedStatus(statusSelect) {
							var status = statusSelect.val();
							
							// as long as our status is in our list of custom
                            // statuses, we want to make sure that the on-
                            // screen display of the posts's status matches
                            // the display of the selected option.
                            
                            if ($.inArray(status, statuses)) {
                                var display = statusSelect.find("option[value=" + status + "]").text();
                                $("#post-status-display").text(display);
                            }
						}
						
						function setHiddenStatus() {
							var status = $("#post_status").val();

							// as long as the status that's selected is a part
							// of our list of statuses, we'll want to set the
							// the value of the #hidden_post_status field to
							// the selected status.

							if ($.inArray(status, statuses)) {
								$("#hidden_post_status").val(status);
							}
						}

						function addCustomStatuses(statusSelect) {
							for(status in statuses) {
								if (statuses.hasOwnProperty(status)) {

									// for each of our custom statuses, we
									// create an <option>.  if our status is
									// selected, then we set that property.
									// otherwise, we set various attributes
									// and then append it to our <select>
									// element.

									var option = $("<option>")
										.prop("selected", statuses[status].selected)
										.text(statuses[status].display)
										.attr("value", status)
										.data("custom", true);

									statusSelect.append(option);
								}
							}

							// in case we need to do anything else after we've
							// changed the DOM, we fire this event, too.  then,
							// other JS can watch for it and handle any clean
							// up or whatever when it's caught.

							var event = new jQuery.Event("postStatusesAdded");
							statusSelect.trigger(event);
						}
					})(jQuery);
                </script>
				
				<?php echo ob_get_clean();
				
			}
		);
	}
252624
public void updatePostStatus(final long postId,
                                final Post.Status status) throws SQLException {
      Connection conn = null;
      PreparedStatement stmt = null;
      try {
         conn = connectionSupplier.getConnection();
         stmt = conn.prepareStatement(updatePostStatusSQL);
         stmt.setString(1, status.toString().toLowerCase());
         stmt.setLong(2, postId);
         stmt.executeUpdate();
      } finally {
         SQLUtil.closeQuietly(conn, stmt);
      }
   }
174521
@Override
    public <P> void pojoDaoCreated(PojoDaoFactoryEvent<P> event) {
        Schema schema = new Schema();
        event.getPojoBinding().describe(schema.createTable(event.getTableName()), schema);
        List<SchemaStatement> statements = schema.items().map(SchemaItem::createStatement).collect(Collectors.toList());
        if (LOGGER.isInfoEnabled()) {
            LOGGER.info("Creating table(s) to support \"{}\":\n\t{}\n", event.getPojoBinding().getPojoType().getSimpleName(), statements.stream().map(SchemaStatement::getQueryString).collect(Collectors.joining("\n\t")));
        }
        statements.forEach(session::execute);
    }
174369
public function postSave(Event $event, $id, $count) {
        if (!$this->getConfig('onSave') || !$this->_saveIndex) {
            return;
        }

        $this->_insertNode($id, $this->_saveIndex);
        $this->_saveIndex = null;
    }
241904
@Override
	public void afterCompletion(int status) {
		// clean up transactions that aren't managed by Spring
		for (DataAccess<SimpleFeatureType, SimpleFeature> dataStore : transactions.keySet()) {
			// we must manage transaction ourselves for non-JDBC !
			if (!(dataStore instanceof JDBCDataStore)) {
				Transaction transaction = transactions.get(dataStore);
				try {
					switch (status) {
						case TransactionSynchronization.STATUS_COMMITTED:
							transaction.commit();
							break;
						case TransactionSynchronization.STATUS_ROLLED_BACK:
							transaction.rollback();
							break;
						case TransactionSynchronization.STATUS_UNKNOWN:
					}
				} catch (IOException e) {
					try {
						transaction.rollback();
					} catch (IOException e1) {
						log.debug("Could not rollback geotools transaction", e1);
					}
				} finally {
					try {
						transaction.close();
					} catch (IOException e) {
						log.debug("Could not close geotools transaction", e);
					}
				}
			}
		}
		transactions.clear();
	}
921099
@Override
  void postProcess(TextView textView, List<BannerComponentNode> bannerComponentNodes) {
    if (exitNumber != null) {
      LayoutInflater inflater = (LayoutInflater) textView.getContext().getSystemService(Context
        .LAYOUT_INFLATER_SERVICE);

      ViewGroup root = (ViewGroup) textView.getParent();

      TextView exitSignView;

      if (modifier.equals(LEFT)) {
        exitSignView = (TextView) inflater.inflate(R.layout.exit_sign_view_left, root, false);
      } else {
        exitSignView = (TextView) inflater.inflate(R.layout.exit_sign_view_right, root, false);
      }

      exitSignView.setText(exitNumber);

      textViewUtils.setImageSpan(textView, exitSignView, startIndex, startIndex + exitNumber
        .length());
    }
  }
845140
public function onMigrationPostRowSave(MigratePostRowSaveEvent $event) {
    // Block logic for queue assignment.
    if ($event->getMigration()->id() == 'gcweb_block_spotlight') {
      $sourceBid = $event->getRow()->getSourceProperty('bid');
      $destBid = $event->getDestinationIdValues();
      if (!empty($sourceBid)) {
        switch ($sourceBid) {
          case 'feature_block_1':
          case 'feature_block_2':
          case 'feature_block_3':
            $this->entityQueueCreate('front_page', $destBid);
            break;
        }
      }
    }

  }
356206
private function updateRecordStatusMany(array $ids, $recordStatus, $method)
    {
        if (count($ids)) {
            $sets[ 'record_status' ] = $recordStatus;
            $primaryKey = isset($this->primaryKey) ? $this->primaryKey : 'id';

            $this->qb->whereIn($primaryKey, $ids);

            if (method_exists($this, 'updateRecordSets')) {
                $this->updateRecordSets($sets[ $key ]);
            }

            if (method_exists($this, $beforeMethod = 'before' . ucfirst($method))) {
                call_user_func_array([&$this, $beforeMethod], [$sets]);
            }

            if ($this->qb->table($this->table)->update($sets)) {
                if (method_exists($this, $afterMethod = 'after' . ucfirst($method))) {
                    return call_user_func([&$this, $beforeMethod]);
                }

                return $this->getAffectedRows();
            }
        }

        return false;
    }
619841
private <Q, R> void recordFinalStatus(JobIdentifier<Q, R> jobId, JobStatus<Q, R> jobStatus) {
        try {
            _jobStatusDAO.updateJobStatus(jobId, jobStatus);
        } catch (Exception e) {
            _log.error("Failed to record final status for job: [id={}, status={}]", jobId, jobStatus.getStatus(), e);
        }
    }