Files
opensourcepos/app/Helpers/plugin_helper.php
objec 4246a915c4 - Correct README.md reference to views and information about renderView()
- Fix the output of pluginContent in the pluginHelper
- Register view injection events
- Correct the parameter type in getMailchimpViewData
- Correct the statusOptions creation business logic
- Removed unnecessary view injection point
- Corrected which variable was passed to the customer_saved event
- Assigned $customer_data['person_id'] on customer update
- Added renderView() function to BasePlugin.php

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-30 14:11:54 +04:00

20 lines
451 B
PHP

<?php
use CodeIgniter\Events\Events;
if (!function_exists('pluginContent')) {
function pluginContent(string $section, array $data = []): string
{
ob_start();
Events::trigger("view:{$section}", $data);
return ob_get_clean() ?: '';
}
}
if (!function_exists('pluginContentExists')) {
function pluginContentExists(string $section): bool
{
return !empty(Events::listeners("view:{$section}"));
}
}