mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-29 18:55:53 -04:00
- 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>
20 lines
451 B
PHP
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}"));
|
|
}
|
|
}
|