mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00

- update .devcontainer settings: remove auto-formatting for php + set intelephense as default formatter - remove prettier php plugin as it lacks php 8 support - add captain hook action for checking style pre-commit - fix style with ecs on all files except views
42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Config;
|
|
|
|
use Analytics\Config\Analytics as AnalyticsBase;
|
|
|
|
class Analytics extends AnalyticsBase
|
|
{
|
|
/**
|
|
* --------------------------------------------------------------------
|
|
* Route filters options
|
|
* --------------------------------------------------------------------
|
|
*/
|
|
public array $routeFilters = [
|
|
'analytics-full-data' => 'permission:podcasts-view,podcast-view',
|
|
'analytics-data' => 'permission:podcasts-view,podcast-view',
|
|
'analytics-filtered-data' => 'permission:podcasts-view,podcast-view',
|
|
];
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
|
|
// set the analytics gateway behind the admin gateway.
|
|
// Only logged in users should be able to view analytics
|
|
$this->gateway = config('App')
|
|
->adminGateway . '/analytics';
|
|
}
|
|
|
|
/**
|
|
* get the full audio file url
|
|
*
|
|
* @param string|string[] $audioFilePath
|
|
*/
|
|
public function getAudioFileUrl($audioFilePath): string
|
|
{
|
|
helper('media');
|
|
|
|
return media_base_url($audioFilePath);
|
|
}
|
|
}
|