What I'm trying to do is parse the custom field data sent to the entry_submission_end
hook.
Here's what I was able to dissect out of the channel entries module, but what I'm confused is how to instantiate an instance of Channel
for use by the template parser library.
public function entry_submission_end_hook($entry_id, $entry_metadata, $entry_data)
{
$tag_to_parse = "{page_uri}";
$channel = new Channel; // do I include mod.channel.php and instantiate this, if so how?
$this->EE->load->library('channel_entries_parser');
$parser = $this->EE->channel_entries_parser->create($tag_to_parse);
return $parser->parse($channel, $entry_data);
}
Ideally this should return the URI of the page for the entry saved via entry_submission_end
.
Alternatively if there is another way to run logic on parsed tag data from a given entry upon saving or creating said entry I'm all ears.