Unverified Commit 68bb91c2 authored by alexpott's avatar alexpott
Browse files

Issue #2976816 by msankhala: CachePluginBase::postRender docblock not using @code for code example

parent 24192468
......@@ -163,19 +163,22 @@ public function cacheFlush() {
/**
* Post process any rendered data.
*
* This can be valuable to be able to cache a view and still have some level of
* dynamic output. In an ideal world, the actual output will include HTML
* This can be valuable to be able to cache a view and still have some level
* of dynamic output. In an ideal world, the actual output will include HTML
* comment based tokens, and then the post process can replace those tokens.
*
* Example usage. If it is known that the view is a node view and that the
* primary field will be a nid, you can do something like this:
*
* <!--post-FIELD-NID-->
* @code
* <!--post-FIELD-NID-->
* @endcode
*
* And then in the post render, create an array with the text that should
* go there:
*
* strtr($output, array('<!--post-FIELD-1-->', 'output for FIELD of nid 1');
* @code
* strtr($output, array('<!--post-FIELD-1-->', 'output for FIELD of nid 1');
* @endcode
*
* All of the cached result data will be available in $view->result, as well,
* so all ids used in the query should be discoverable.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment