\ShortCodeRelationFinder
Finds {@link DataObject} instances using certain shortcodes by fulltext-querying only fields which are capable of parsing shortcodes.
Effectively the reverse of "link tracking",
which updates this relation on write rather than fetching it on demand.
Doesn't scale to millions of pages due to triggering a potentially unindexed LIKE
search across dozens of columns and tables - but for a couple of hundred pages
and occasionally use its a feasible solution.
Synopsis
class ShortCodeRelationFinder
{
- // members
- protected String $fieldSpecRegex = '/^(HTMLText)/';
- // methods
- public array findPageIDs()
- public void findPageCount()
- public DataList getList()
- public Array getShortcodeFields()
Members
protected
- $fieldSpecRegex — String
Methods
public
- findPageCount()
- findPageIDs()
- getList()
- getShortcodeFields() — Returns a filtered list of fields which could contain shortcodes.