1
0
قرینه از https://github.com/matomo-org/matomo.git synced 2025-08-22 15:07:44 +00:00
Files
matomo/tests/PHPUnit/Framework/Mock/Plugin/CustomUserLogTable.php
Stefan Giehl e1c1f12593 Make it possible to define joins for log tables using getWaysToJoinToOtherLogTables (#14062)
* Make it possible to define joins for log tables using getWaysToJoinToOtherLogTables

* Adds some tests for custom log table joins

* add missing log tables joined using getWaysToJoinToOtherLogTables

* automatically add log tables up the hierarchy

* code improvements

* Adds new ExampleLogTables plugin giving a showcase for custom log tables

* specifiy table name in userid archiver to fix query if custom log table joins on user_id column

* fix tests

* Adds log table that does only indirectly join with log_visit

* Allow defining joins on visit and action

* update ui files
2019-03-11 14:26:37 +01:00

29 خطوط
457 B
PHP

<?php
namespace Piwik\Tests\Framework\Mock\Plugin;
use Piwik\Tracker\LogTable;
class CustomUserLogTable extends LogTable
{
public function getName()
{
return 'log_custom';
}
public function getIdColumn()
{
return 'user_id';
}
public function getPrimaryKey()
{
return ['user_id'];
}
public function getWaysToJoinToOtherLogTables()
{
return ['log_visit' => 'user_id'];
}
}