Version: 4.1.3 Reporter: Low —
For Low Search, I use the after_channel_entry_save hook to keep the search index up to date. For this, I use a method (that I use in multiple places) that takes an entry ID, retrieves the entry and updates the index accordingly. I use ee('Model')->get('ChannelEntry')...
to get the entry.
In this particular hook, I get the new values for any field that is either native (like title) or ‘old’ (ie. pre EE4, still residing in exp_channel_data). But for ‘new’ fields, so fields having their own table, I get the old value and the new value isn’t actually updated in the DB yet. The ChannelEntry model object I get from EE therefore has mixed old and new values.
In this particular case, I can’t use the model that’s been passed through as an argument in the after_channel_entry_save hook, because I’m using the reusable method described above.
ExpressionEngine implements Markdown Extra and BBCode. Please see the Markdown Extra docs and the BBCode Wikipedia article for a full reference.
**bold**
, __bold__
, *italics*
, _italics_
, ~strike/del~
, `code()`
bold, italics, strike/del, code()
Link: [link title](https://example.com)
Image: ![alt text](https://example.com/image.jpg)
[blockquote]...[/blockquote]
, [quote]...[/quote]
, and Markdown style:
> Some quoted text. > > This is all one quote.
[code]...[/code]
, and you can also specify the language for syntax highlighting, [code=php]...[/code]
GitHub flavored Markdown code fences are also supported:
``` public function decoderRing($str) { return str_rot13($str); } ```