text_reparser.plugin
. The content will automatically be reparsed when a global reparsing is executed. Check out config/default/container/services_text_reparser.yml
.If the text is in a database row with a unique ID then you can extend
phpbb\textreparser\row_based_plugin
like phpbb\textreparser\plugins\pm_text
does.
get_columns()
maps record field names to column names. It must contain at least three elements:id
,text
andbbcode_uid
.get_table_name()
returns the table's name.
Otherwise, you need to extend
phpbb\textreparser\base
like phpbb\textreparser\plugins\poll_option
does.
get_max_id()
must return the highest ID for the content.get_records_by_range()
must return a list of records.save_record()
is called with the updated record.
text
and bbcode_uid
. If it's a row-based plugin as described above, it must contain id
too. It can optionally contain the following elements:
enable_bbcode
enable_smilies
enable_magic_url
enable_flash_bbcode
enable_img_bbcode
enable_quote_bbcode
enable_url_bbcode
options
, which should contains an integer used as a bitfield where theOPTION_FLAG_BBCODE
,OPTION_FLAG_SMILIES
andOPTION_FLAG_LINKS
bits toggle the corresponding feature
save_record()
.